It’s sometimes more fun to find one or two slightly useful shortcuts and spam them any chance you can as opposed to reading a cheatsheet. Here are a couple of nice movements that I’ve found:
o/O
: Add a new line and go into insert mode. There are no additional words needed to describe its infinite usefulness.=
: Indent the file. Especially great after I’ve let a file of code go to chaos. Of course, this isn’t always perfect but if anything, it beats stylua, which makes my snippet code an absolute mess.t
: Apparently tags are a thing?~, C-a/C-x
: Used to change the case of letters and increment/decrement numbers respectively. Sure, you can use r
as well, but having these keymaps makes things slightly faster.([num])C-a/C-x
is life-changing.s
: For surrounding, not delete and go into insert mode. I can’t believe I’ve used (Neo)vim for so long and haven’t been on the surround wave.zz
: do not remap this to save. Centering your cursor is more important.zt
(cursor to the top) and zb
(cursor to the bottom)?!@macro
while recording @macro
: I accidentally forgot to stop recording my macro, and I did @macro
by accident before stopping. This resulted in a self-referencing macro which did the work for me, which was very nice."[reg](y|p)
: custom registers saved me so much time when typesetting math..
: how I went over a year being a Vim enjoyer and didn’t know this shortcut is still surprising.