My Vim cheatsheet
Movement
gg
: the beginning of the fileG
: the end of the file0
: the beginning of the line^
: the first non-blank character of the line$
: the end of the linew
: next wordb
: previous worde
: end of word
Insert -> insert mode
I
: insert at the beginning of the lineA
: insert at the end of the lineo
: insert a new line below the current lineO
: insert a new line above the current line
Actions
d
: deletec
: changey
: copyv
: enter visual mode
Motions
i{object}
: inner object(inside)a{object}
: outer object(around)
Text objects
w
: wordb
: bracket (or(
,{
,[
,<
)t
: tagq
: quote (or'
,"
, ```)
Return to normal mode
- Esc
- Ctrl + [
Miscellaneous
gd
: go to definitionf<char>
: find character
Move to other end of marked area Visual mode
Press o
at visual mode
Change case in Vim
Select the text then:
U
for uppercaseu
for lowercase~
for toggle case