3

There are already a lot of similar questions to this.

They all end with toggling the startofline setting. Using startofline it's possible to start a visual selection with Ctrl-v and then use gg or G to select entire columns of text from the cursor to the beginning or to the end of the file. What if I want to select an entire column that doesn't go to the beginning or end of the file?

So for this text:

first line

x b c
a m w
q y c
a e z

last line

If the cursor was on b in the line reading x b c, how can I select the column starting at that b and ending on the e in a e z?

For non-column oriented actions similar to this I would use the shift paren/bracket family but they seem unaffected by nostartofline.

3

1 Answer 1

4

Probably the simplest way to solve this (apart from using something like ctrl-v 4j) is to use the textojb-word-column plugin: if cursor is placed on the "right" column, a simple vic will get the job done. This is the demo from the plugin page:

gif demo from the plugin page

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.