Hacker News new | ask | show | jobs
by _7tgr 894 days ago
> since vim's visual modes always extend

Certainly an interesting point! Maybe this'll be addressed better once nvim adds multiple cursors (it's on the roadmap).

Though I've never found this to be annoying, or felt I really wanted multiple cursors while doing something; maybe I'm inexperienced with using them. For complex/wide-ranging edits I usually record an edit action at a particular instance of what I wanna change as a macro and generalize that if necessary by composing it with more macros, instead of editing everywhere at once in one fell swoop. I think it's just a different way of going about it (which happens to work more intuitively for me).

> and you lose selections on going back to normal

FYI: gv restores the prior visual selection; I'm not sure if this is what you meant

1 comments

it's indeed hard to assess what you miss if you have no personal experience as you do get accustomed to whatever the current workflow is, and in really complex/wide-ranging edits those might not even help (eg, if you have cursors outside your viewport it's not very helpful as you lose the immediate feedback that allows you to catch the errors and thus be more lax with your "list of steps", you could cycle around, but then this might not be better than cycling and reapplying your macro)

But then for less wide-ranging edits it's invaluable, and also helps in vim-golfing :) vs. having to record a macro and jump around to repeat it

Good point re. gv, didn't mean "permanently lost", but rather lost=deselected (and not requiring a restore selection step).

For example, even entering insert mode, adding a symbol, and going back to normal, retains the selection. Or entering "extend selection" mode in Helix (which is like vim's Visual mode) and exiting it also retains the selection until you move your cursor with a selection-changing operation.