-
-
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
README needs more information about Multi-Cursor mode for Vim users #3588
Comments
Does In general I find this plugins support for "vim and multi cursor" support a bit lacking... which is too bad since I would really like to combine my favourite features from Sublime Text with new tricks I'm learning from vim side. |
I'm on Linux so I don't have a cmd key, but I tried every combination of ctrl/shift/alt+L and unfortunately it didn't work. The cursor just jumped to the last character of the last selected line. |
@Hubro might also be Search for |
Well that did something :P It adds a cursor to each line ending, but at the same time the Vim extension throws an error "ModeHandler: unexpected selection mode. selectionMode=4", and Vim mode stops working until i exit multi-cursor mode. |
So is this possible or just lacks documentation? |
As as vs code noob, id really like more info about using vim mode with more common GUI editor features like multi line plugins. |
I have to disable VSCodeVim for Oh. wait... |
Have same issue. Could i customize the correspond Vim Extension? |
Just as a comment for others looking at this, I just figured out the way to do it is to select the lines I want to add cursors to using visual mode, then |
I've finally found a way to emulate terryma/vim-multiple-cursors in VSCode. I've been using Cygwin + Vim and the
According to the VSCode basic edition command documentation, we can use the built-in commands to emulate the plugin. Here's the working code, insert this into your
USAGE
Now this is great, but what I desperately couldn't live without was the ability to select partial pattern matches already part of a word. For example
I wanted to be able to find all partial matches from a section of the word using Notice only the three matches where it skips all other matches that also contain the pattern. What I wanted to achieve was this: But I was running into the same problem of the cursor being applied only to the first cursor. After so much experimentation, I WAS FINALLY ABLE TO ACHIEVE IT. From what I understand, when adding additional pattern selections, USAGE
Now here's where it get's buggy. Currently only the "A" ( USAGE
For all other commands, it requires multiple keypresses since according to the VIM extension shortcut docs, there is no command to enter into
This example is: NOTE: THIS IS ONLY for when you select partial matches in a word. If you select full words using (
In the future, if there's a new Hope it helps!!! |
@nathancy That's very interesting. Would it make sense to pursue a bug fix in vscode:
Would it solve all that you're trying to do if the above is fixed? |
Yes, I believe the root problem involves selecting cursors in The editor state:
Now here's a demo of incorrect behavior The incorrect editor state:
It should be
If there's a bug fix for this then there wouldn't be a need for the hack to switch window focus |
@nathancy will the hack work if I map them to Cmd+D/Ctrl+D instead? |
So is there an issue filed against this bug so that we can track it? |
Yes you could map to I'm not aware of any open issue filed against this bug and haven't filed a bug fix issue for it. |
Ah ok. I mean, it seems to me to make more sense to file an issue than to come up with an awkward workaround. Although I do appreciate your coming up with a workaround, it would only help the few of us who happen to read this thread rather than helping everyone else who uses vscode and multiple cursors. |
On macOS, I am able to make it work by doing the following: Normal mode:
For fine-grained selection of text, you could:
|
Any updates on this? I've been having this issue forever (sometimes will not switch to multi cursor mode - but switching to a new tab and back will fix it). I've also noticed that when closing a file and reloading it usually this issue is resolved. |
@justinlaughlin Not sure anyone has filed an issue against the related bug in core VS Code. If there were, that would be the appropriate place to track this issue. |
Shift + A or Shift + I doesn't work. |
This article was helpful for me, about using multiple cursors when using Vim keybindings in VSCode. None of the The only command that works for me is typing |
Same, I can't seem to insert a cursor using ctrl+d, my cursor just skips to the middle of the current visible code lines |
I can use ctrl shift l to edit into multi caret mode but how do I edit all instances ? :( |
@gerroon , I'm using vim mode on vscode on windows, after I generate multiple cursors (using |
I've been using VSCode for a couple of months after using Vim + vim-multiple-cursors for years. I'm still having way too hard a time using the Multi-Cursor mode in VSCode + Vim.
The only "official" information I've found about how to use it is in the plugin README, where it says I can use "gb" to select the next matching word. That still leaves me with many questions that I think should be addressed in the Multi-Cursor mode section of the README:
30<C-S-Down>
to do that instantly, instead I have to move my right hand down to the arrow keys and spam down 30 times - very un-vim-like. Although I wouldn't ever need to use this keybind if I could go from visual block mode to Multi-Cursor mode.I think adding some more information about how Multi-Cursor mode is used would help relatively new users like me a lot.
The text was updated successfully, but these errors were encountered: