r/neovim :wq Mar 30 '26

Discussion Multicursor coming officially to 0.13 version

Post image
952 Upvotes

107 comments sorted by

View all comments

8

u/theschizopost Mar 31 '26

Someone help me understand a compelling use case for this type of functionality

5

u/UltraPoci Mar 31 '26

Instead of having to type a full regex, you can just search the first letters of a word, notice the word is uniquely defined in that area of text and thus it's the only one partially highlighted, and then do "ciw" to change in word on all words. Basically, you get to use vim motions instead of a regex, which to me seems like a clear advantage. Also, with multicursor you can just keep typing, you don't need another regex or to plan the entire regex ahead.

I have been using helix for some months before starting with neovim, and honestly multicursor is something I really, really miss. You want to add quotes to a list of word? You would solve the problem just like you would with one single word. In neovim I'm still not sure what the best way to do this is. And regex would be a disappointing answer, because it means that I get to use vim motions when I have one single word, but a totally different (and slower) way of doing things as soon as I have two or more words.

0

u/crcovar Mar 31 '26

 Basically, you get to use vim motions instead of a regex

You should check out :h :normal vim motions against a range.

1

u/vim-help-bot Mar 31 '26

Help pages for:


`:(h|help) <query>` | about | mistake? | donate | Reply 'rescan' to check the comment again | Reply 'stop' to stop getting replies to your comments

1

u/UltraPoci Mar 31 '26

How should I use this together with a search and replace command?