Vim
# Vim
# Text
dawdelete word under cursord/cib- delete a block surrounded by (d/ciB- delete a block surrounded by {d/cas- delete a sentenced/cap- delete a paragraph- Visual select the text, then
Ufor uppercase orufor lowercase. To swap all casing in a visual selection, press~(tilde).
# Windows
CTRL-W= equal sizeCTRL-W- decreases the current window:vsp vertically split windows:e edit new file in current buffer<C-^> quickly switch buffer (this and before, only 2 buffers will be loaded)
# Dot .
Can be used only after text is changed
# Macros
Macros | Vim Tips Wiki | Fandomq<letter><commands>q where letter is a-z<number>@<letter> to use
# Movements
JK move 5 linesR replace more charHL move to beginning or end, equivalent to ^$
# Indent
<G / >G to indent (. to repeat)
# Tricks
Write as sudo
:w !sudo tee%
Set
-as a wordset iskeyword+=-