Move

hjkl //move e // end of word b // back of word w // word ctrl v // (visual mode) v // select V // select line // >> << indent dw // delete word cw //change word D // delete after cursors dd // delete line daw // delete all word dt + {char} delete til (char) di + { [ ( delete inside parenthesis curly bracket or square bracket ci { [ (

Navigation

0 start of line $ end of line gg go to top shift + g go to bottom :{number} // go to line {number} + shift + g // go to line { | } // navigate between paragrapphs (find for empty lines) H | M | L // top|middle|low of the screen / {pattern} //. search for pattern (n or shift + n) // to go next or prev ocur // * to go to next word as where the cursor is positioned // # to go to prev word as where the cursor is positioned

Numbers

ctrl + a // increment of 1 ctrl + x // decremt of 1

Modify content

o insert below O insert above p paste below P paste above r replace s substitute (delete char and enter insert mode) i insert before shift + i insert at the beggining of the line a insert after shift + a insert at the end of the line f find (; | , to move between char ocurrences) shift j // join lines ~ capitalize

Commands

. repeat last command % navigate to matching bracket

MACROS

qz will start recording your actions and name them “z”. Perform the actions you want to record. Then press q to stop your recording. Use @z to replay the macro named “z”. Macros are tricky to get correct on the first try, do not be afraid to restart and press “Reset”. qz to start recording macro q to stop recording macro @x to execute macro

Surround vim

ysiw surround insert word ysa}] surround word around brackets cs{[ surround curly with square