h,j,k,l- left, down, up, rightH,M,L- move to top, middle, bottom of screenw- jump to start of next wordb- jump to start of previous word0- jump to start of line^- jump to first non-blank character of line$- jump to end of lineg_- jump to last non-blank character of linegg- go to top of file5gg- go to line 5G- go to bottom of file4j- move down 4 lines /4k- move up 4 linesCtrl+b- page up /Ctrl+f- page downCtrl+d- move half page down /Ctrl+u- move half page up
i- insert before cursor /a- insert after cursoro- insert new line below /O- insert new line aboveA- insert at end of line /I- insert at start of lineEsc- exit insert mode
u- undoCtrl+r- redodd- delete lines- delete character and enter insert mode5dd- delete 5 linesyy- copy linep- paste after cursorP- paste before cursorx- delete characterr- replace charactercw- change wordcc- change entire lineci"- change text inside quotesci'- change text inside single quotesci(- change text inside parenthesesci{- change text inside curly bracesci<- change text inside tags.- repeat last commandJ- join current line with next line
v- start visual modeV- start line-wise visual modeCtrl+v- start block-wise visual modeaw- mark a worda(- a block with ()a{- a block with {}a<- a block with <> tagsi(- inner block with ()i{- inner block with {}i<- inner block with <> tagsy- copy selected textd- cut selected textp- paste selected textyaw- copy a word>- indent selected text<- unindent selected text~- toggle case of selected textu- change marked text to lowercaseU- change marked text to uppercase
/- search forward?- search backwardn- next search resultN- previous search result:%s/old/new/g- replace all occurrences:noh- remove search highlighting
:w- save file:q- quit:wqor:x- save and quit:q!- quit without saving
:e filename- edit a file:sp filename- open file in horizontal split:vsp filename- open file in vertical splitCtrl+w h/j/k/l- navigate between splits
zz- center cursor on screen>>- indent line<<- unindent lineci"- change text inside quotes%- jump to matching bracket