I’ve been using Neovim for about eight years, but I knever knew about :help o_CTRL-V
until today. It lets you perform a command over a column.
I had the code below and wanted to remove all trailing colons:
foo:
bar:
baz:
faz:
What I meant to do was to do was (with the cursor on the first line) $<C-v>3jd
to visually select all colons and then delete them. But I accidentally did $d<C-v>3j
, which, to my surprise, did the same thing.
I did know about :help o_V
, which lets you turn a characterwise operation like di{
into a line-wise one by doing dVi{
. But it never occurred to me that I could do the same thing with <C-v>
.
You must log in or register to comment.
There’s also shift+v to select whole lines.