There are already a lot of similar questions to this.
- Jump to last line, but stay in the same column
- How to go to the end of the file in vim while preserving the current column under the cursor?
- How do you select a whole column in visual block mode?
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
.