What I learned by vimtutor.
Skip this. Use vimtutor instead.
c [number] motion
0Begin of line$End of line
uundoUundo lineCTRL+rredo
- Press
Gto move you to the bottom of the file. - Jump to line
123Gor:123 - Type gg to move you to the start of the file.
- To go back to where you came from press
CTRL-O CTRL-Igoes forward.%jumps between matching parentheses
- To search for a phrase in the backward direction, use
?instead of/.
:%s/old/new/gcreplace word in file with confirmation
:w FILENAMEwrites the current file to diskv motion :wFILENAME saves the Visually selected:r FILENAMEreads file and inserts it:r !dirreads the output of the dir command
iinsertainsert after cursorIinsert begin of lineAinsert end of line
rone charRreplace multiple charsCtrl+jremove line break
Jump in file aka Autojump ,,w
Select next occurence of word CTRL+n
Format code with ,p or on save
Surround with parens eg. ysiW" or ds"