Brainscape Vim Flashcards
forward word/WORD
w / W
backward word/WORD
b / B
end of word/WORD
e / E
end of previous word
ge
beginning of line
0
beginning of text in line
end of line
$
land on next/previous “x” in line
fx / Fx
land just before the next/previous “x” in line
tx / Tx
next/previous (intra-line) find result
; / ,
move to matching parenthesis or bracket (or whatever is set in the ‘matchpairs’ option)
%
go to beginning of file
gg
go to end of file
G
go to line 7 of file
7G or 7gg
go to three-quarters of the way through the file
75% (you can use percentages!)
move cursor to the top of the screen
H (remember “highest”)
move cursor to the middle of the screen
M
move cursor to the bottom of the screen
L (remember “lowest”)
turn line numbers on/off
‘nu’ ‘number’ ‘nonu’ ‘nonumber’ :set nu, :set number/:set nonu, :set nonumber (also :# will just show you your current line number without turning on numbering)
turn on/off line number and percentage in the status bar
‘ru’ ‘ruler’ ‘noru’ ‘noruler’ (e.g. “:set ruler”)
scroll whole page at a time (name for both directions)
CTRL-F / CTRL-B (remember “Forward”/”Backward”)
scroll half a page at a time (name for both directions)
CTRL-D/CTRL-U (remember “Down”/”Up”)
scroll one line at a time (name for both directions)
CTRL-E (down) / CTRL-Y (up)
move the LINE with the cursor in middle of visible screen
zz