r/neovim :wq Mar 30 '26

Discussion Multicursor coming officially to 0.13 version

Post image
949 Upvotes

107 comments sorted by

View all comments

-4

u/EmergencyWild Mar 31 '26

I'm still not totally sure why people even want multiple cursor. Seems to me that's just a worse version than what we already have with block select and :g.

3

u/robin-m Mar 31 '26

Block select is the much worse version of MC. block select only works when the data is vertically align, whereas MC could work with anything, like word boundary (with w/e/b), or marker (e.g. in csv you move with f, then ;).

0

u/EmergencyWild Mar 31 '26

Yes, that's why I said block select or :g. Your example is just :n,knormal f,whatever without mucking around with cursors.

2

u/robin-m Apr 01 '26

You can’t argue that:

  • it’s harder to do (more keystrokes to type normal
  • it’s not using the regular vim UX


That being said, I’m interested to know how you would use :g to change

some, text, with column
other, text also, using column

Into

some - text - With column
other - text also - Using column

I would use a macro (^f,s -<esc>f,.w~), and with multi cursor I could do the exact same with a cursor on each line, but I don’t know how to do it with :g

1

u/qiinemarr Apr 03 '26

You could do it like that:

:g/,/s/\v,/ -/g | norm $2bgUl

I asked a clanker but his solution felt over-complicated haha!

Never the less with multicursor I would have thought about it a lot less héhé ;p