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. Also, writing it here makes it easier for me to remember to use them again. 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.%
: I forgot the keybind to find the matching delimiter/parentheses or whatever the right word for this is. But now I won’t.submatch([num])
: “I’d like to use match groups in (Neo)vim but I don’t think they have it” - me, some while ago. They do, as I found out one day after looking for something else entirely. Why I did not do a simple search online earlier still baffles me to this day.#
: keep accidentally pressing this (similar to .
sometimes as well) and just found this to be annoying since it’ll highlight the word under the cursor. Except for this is incredibly helpful for finding other instances of a word under the cursor (yes, I know I have vim-illuminate) but still I end up pressing #
more often and find n/N
more useful to move around. Maybe that’s just a sign I should stop using this plugin.