documentation for commands can be found here

commands

from normal mode

purposecommand
save and quitshift+z, shift+z
save without quitting:w
quit without savingshift+z, shift+q
insert mode (equivalent to standard mode of other text editors)i
search forward/thing ur searching for+enter
search backward?thing ur searching for+enter
go to next occurrence of last search/+enter or n
go to previous occurrence of last search?+enter or N
find and replace on current line:s/pattern/replace/g
repeat last substitution on current line&
find and replace in current file:%s/pattern/replace/g
find last search and replace in current file:%s//replace/g
undou
go to top of filegg
go to bottom of fileG
select all text in a fileggVG
paste into line belowp
delete selectiond
delete current linedd
move current line downddp
move current line upddkP
copy current line/selectionyy
insert line aboveO
insert line belowo
go to the beginning of the current line and switch to insert modeI
go to the end of the current line and switch to insert modeA
select the word under the cursorviw
open link under the cursorgx
move one word rightw
move one word leftb

from visual mode

enter visual mode by using the mouse to select something, or by pressing v (or V to select whole line)

purposecommand
toggle commenting of selecting lineshighlight lines, then gc
paste into selectionp

other

abbreviationmeaning
<.*>keystroke
<CR>enter (carriage return)
<C>control
<S>shift
  • the following characters need to be escaped when searching: / ~