0

One feature useful to me is Ctr-V column visual mode. This way I can avoid typing lines nearly the same multiple times. Is there a way in vim I can do this over a range like 5,14,22,.. so that the change is applied to those lines as well?

1 Answers1

1

Not without a plugin.

There are a handful of plugins with "multi-cursor", "multi-line" and/or "multi-edit" functionality.

At least one emulates the multi-cursor behavior found in the Sublime editor: https://github.com/terryma/vim-multiple-cursors. The basic functionality is to place cursors wherever you like by clicking and then start typing. The text will appear simultaneously at every location with a cursor. You can also place the cursors based on a regex rather than where you click your mouse. I've installed this one and it works pretty well but I don't use it all that much since it's not a way of working that I find myself unable to replicate or approximate by other means.

Another operates a lot like Visual mode except you can select non-contiguous sections of text: https://github.com/alfredodeza/plexer.vim . I haven't tried this one.

I'm sure there are others.

B Layer
  • 19,834
  • 2
  • 30
  • 57