Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The canonical answer to this request is as follows: if you need multi-cursor (or, worse, multi-cursor with mouse support) then you are doing something non-Vim way (aka: wrong way) and there is a better way to do it.

If you need multi-cursor to do manual search and replace in text, then don't, just do automatic search and replace, maybe scoped to a block. If you need multi-cursor for refactoring or renaming a variable across entire source file, then don't, use LSP plugin (or switch to Neovim) and do the proper refactoring action.

Sure, there are legit cases of using multi-cursor in Vim, but they are rare. So it's not worth to put it into Vim itself.

 help



personally, I know I can use search and replace, but <ctrl-n>-n-n-c-replacement[0] is easier on my mind than the search&replace alternative

[0] I've been using vim-multiple-cursors for years, it's abandoned but still works ok most of the time.


Do you know about *? It puts the word currently under the cursor into the search history.

So you can do *ciw, type your replacement, then n.n.n. to do the rest.

Obviously LSPs are more powerful though.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: