Open c99zealot opened 5 years ago
I use visual block a lot for removing areas of whitespace used for alignment, removing sections of a column, capitalising a section of a column - anything regarding selecting columns or multiple partial lines.
Open the same file in vis, move to the first A
and run 10<ctrl-j>
. You'll select the same 10 positions as in your screenshot, but each with a different cursor. Removing areas of whitespace used for alignment or sections of a column will be easier than with visual-blocks.
agree++ on what ninewise said, the cursors thing is the alternative for visual block mode in vim
consider closing the thread
Multiple cursors feature can do everything visual-block does and more. Agree on closing the thread.
To add to ninewise's comment, after creating the cursors hit v
to enter visual selection mode to arrive at exactly the same behavior as vim's block mode, ie. (vim) C-v,jje == (vis) C-j,C-j,ve
.
One thing vis can not do is set the "block" height by applying any motion to one of its corners, or by using a textobject. <C-j>
/<C-k>
are just hardcoded special cases for the j
and k
motions.
Here's a patch that maps <C-v>
to a new operator capable of creating selections based on the textobject/motion supplied - https://repo.or.cz/vis/gkirilov.git/commit/refs/heads/patch-lastcol-multisel-operator (posted it on the wiki, too)
Could you maybe give an example of what you'd use this for? For the things I remember using visual-blocks for, multiple vertically aligned selections on a continuous range of lines are very similar.