re: Boost Your Coding Fu With Visual Studio Code and Vim VIEW POST

re: Thanks for the great post!! DO you have some insight about using multiple cursor in VIm/VSCode? I could use some help there!

Thank you!! πŸ˜€

If you are in insert mode it works as usual. In normal mode there's this experimental feature which TBH I haven't tested yet 😁:


Unfortunately, in insert mode, it seems no to work. I used to type βŒ₯ + cmd + ↓ to add multiple cursors in column down but it doesn't work with Vim enable

Hmm I'd swear this used to work. πŸ˜… I'm going vacation but I'll take a look when I'm back 😊

In fact, it works on normal mode and entering in insert mode would keep the multiple cursors.

Thank you! And you're right, I found this issue on their github repo:

which describes your problem. I'm pretty sure this used to work but they must've had a regression (but perhaps I'm wrong XD)

It looks like the current implementation is somewhat experimental. The flow you describe seems to work pretty well from normal mode. And if you want to add multiple cursors based on keyword search you need to:

  1. cursor on top of something
  2. cmd-d or gb to add another cursor
  3. This seems to put Vim into visual mode (ready to operate on the selection which makes sense)
  4. cmd-d or gb to continue adding cursors until you're done
  5. Now you can perform an action in visual mode (delete, change, etc) or,
  6. go back to normal mode with ESC and do any normal mode command keeping the multiple cursors

There's a feature in Vim that may solve your use case slightly faster than multiple cursors called Visual Block:

  1. CTRL-V to change to visual block mode
  2. j to select a rectangle of text downwards
  3. I to insert or A to append, insert text and ESC

(The VSCode implementation seems to use multiple cursors under the hood anyway :D)

code of conduct - report abuse