Repository navigation
On Type Rename for #88424 - #92597
Merged
Merged
Conversation
Alexandru Dima (alexdima)
approved these changes
Mar 16, 2020
Alexandru Dima (alexdima)
left a comment
Member
There was a problem hiding this comment.
Looks good! I just left a few comments.
| autoIndent, | ||
| automaticLayout, | ||
| autoRename, | ||
| renameOnType, |
There was a problem hiding this comment.
I like to keep these sorted alphabetically, please move it down a bit.
| autoRename: register(new EditorBooleanOption( | ||
| EditorOption.autoRename, 'autoRename', false, | ||
| { description: nls.localize('autoRename', "Controls whether the editor auto renames on type.") } | ||
| renameOnType: register(new EditorBooleanOption( |
There was a problem hiding this comment.
also here, please move it down a bit.
| @@ -243,10 +283,6 @@ export class OnTypeRenameAction extends EditorAction { | |||
| kbExpr: EditorContextKeys.editorTextFocus, | |||
| primary: KeyMod.CtrlCmd | KeyCode.F2, | |||
Member
There was a problem hiding this comment.
I think Ctrl+F2/Cmd+F2 are already taken, so perhaps no keybindings is necessary here.
Member
|
Pine (@octref) There is still the problem of the Ctrl+F2 conflict, and some tests that need to be skipped. 👍 Otherwise, please merge. I suggest other work in HTML to adopt this feature should IMHO be done in another PR. |
Contributor
Contributor
Author
|
Andrii Dieiev (@IllusionMH) I pushed 01e01b1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes #88424.
editor.renameOnTypelanguages.registerOnTypeRenameProvideronTypeRenameProviderfor HTMLProposed API:
I think most of the cases work fine. There are 2 failing tests but I'm not sure why they happen, since the behavior in the editor is correct but the test still fails.
The two cases that's failing in the editor are:
<div|></div>div) and then undo for<div|></div>The cause seems to be that setting
EditorOperationTypedoesn't work for paste/delete-word.But other than that, this seems to work fine. I'm planning to put it in insiders and turn it on for people who have enabled
html.mirrorCursorOnType.