vim Snippets
Moving around
f
andF
will jump the character on the line that you enter. Shift F will go backwards.t
andT
are similar but will put you one character in front of where you want gogu
andgU
- and number for lines to make upper or lower case.
Showing Spaces
:set listchars=eol:$,tab:>-,trail:~,space:␣
:set list
The space:␣
is gold. Thank you loxaxs!
Preventing Indenting when Commenting
You’ll need to add the following to any filetype. (In this case we’re showing # and yaml)
set indentkeys-=0#
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab indentkeys-=0#
Block Editing
Enter visual mode: Control-V Select lines: eg. 5j for the next 5 lines Enter Insert with Shift-I Type stuff/make changes Hit Escape