motions Flashcards
h j k l
left, up, down, right
w, b
W, B
next word, previous word
Use whitespace as the word boundary
e, ge
E, gE
end of (next) word, end of previous word Use whitespace as the word boundary.
0 (zero)
To first character in line
^ (caret)
To first non-blank character in line
$
To last character in line
N | (s a pipe)
To column N
N f{char}
To the Nth occurrence of {char} forward in file
N F{char}
To the Nth occurrence of {char} backward in file
N G
goto line N. Default is last line.
gg
goto first line
/(string)
Search for a match forwards - string is regex
?(string)
Search for a match backwards - string is regex
n
repeat last search
N
repeat last search in opposite direction
- (star character)
search forward for the identifier under the cursor
(octothorpe)
search backward for the identifier under the cursor
g* or g#
like * or # but also finds partial matches
gd
goto local declaration of identifier
gD
goto global declaration of identifier
:ju[mps]
print the jumps list
:mark
print the active mark list
m{a-zA-Z}
mark the current position with {mark}
`{a-z}
goto mark in current file