-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve multicursor support #4570
Conversation
Not easily. I've filed #4582, which I'll try to get to soon |
I'm guessing this would also fix #3976? |
Sorry for the merge conflicts, by the way. Once those are resolved and I get the chance to play around with this a bit, we can merge it in. I'm focusing this release on getting multi-cursor to "just work" as much as possible, and this'll be a huge help. I'm going to write a whole bunch of tests once #4583 is done, so no need right now. |
What this PR does / why we need it:
It fixes multicursor snippets, and adds support for stuff like auto-bracketing and auto-completion on multicursor mode.
5fd59f7: (Backspace Support)
Makes
range
represent theselection
atposition
. This way we delete the correctrange
rather than the primary selection as it was before these changes.59496be: (Multicursor Character Insert)
Makes multicursor text insertion behave like single cursor text insertion by ultimately using the
default: type
command rather thanvscode.TextEditor.insert()
which doesn't have support for snippet mode, auto completion, bracketing, etc.To accomplish this, I've added an optional property (
isMultiCursor
) toInsertTextVSCodeTransformation
which representsvimState.isMultiCursor
at the time the transformation was created. This property is used to filter the multicursor transformations intomulticursorTextTransformations
.Because the
default: type
command handles inserting the text into the correct cursor positions there's no need to repeat the transformation multiple times and we can just execute the command once, as long as we know all transformations are trying to do the same thing.Which issue(s) this PR fixes
Fixes #4281
Fixes #4223
Fixes #3005
Fixes #4522
Fixes #4515
Fixes #1946
fix #3976
Special notes for your reviewer:
Is there a way to programmatically test this stuff?... I've pretty much just done a bunch of manual testing, and it all seems to work fine. Let me know what you think, I'd be happy to keep working on it.