Navigation |
h (⌫ ) l
j (↩︎ ) k
|
left/right
down/up
|
^b ^f |
one page backward/forward |
^u ^d |
half page up/down |
12j |
down 12 lines |
zt zz
zb
|
top/center/bottom this line |
|
w W |
next word/WORD |
b B |
begin of word/WORD |
e E |
end of word/WORD |
ge gE |
go end of prev word/WORD |
|
0 $ |
start/end of line |
^ g_ |
first/last non-blank character of line |
|
( ) |
prev/next sentence |
{ } |
prev/next paragraph |
|
gg G |
first/last line of file |
12gg |
go to line 12
= 12G
|
|
% |
jump to matching bracket |
Search |
f{char}
F{char}
|
find next char forward/backward |
t{char}
T{char}
|
til (until) next char forward/backward |
; , |
repeat find in same/opposite direction |
/{regx}
?{regx}
|
search regx forward/backward |
* # |
search selection forward/backward |
n N |
repeat search in same/opposite direction |
Mark |
m{mark} |
mark position |
`{mark} |
jump to line and column of mark |
'{mark} |
jump to line of mark |
|
^o ^i |
jump back/forward from jump list |
Edit |
i a |
insert/append in cursor |
I A |
insert/append in line |
o O |
open a new line below/above |
J |
join line below |
|
gcc |
toggle comment |
gc |
toggle comment |
u U |
lowercase/uppercase |
|
x X |
delete char before/after |
s S |
change char/line |
r R |
replace character/mode |
C |
change to end of line |
dd |
delete line |
yy |
yank line |
^h ^w ^u |
delete back one char/word/line |
|
p P |
put after/before cursor |
]p |
put after cursor with indent |
"+p "+y |
put from/to system clipboard |
^r{reg} |
put from register |
|
^a ^x |
add/subtract a number |
Indent |
>> << |
indent/de-indent |
>% <% |
indent/de-indent block |
^t ^d |
indent/de-indent |
Spell |
z= |
spell suggest |
zg zw |
mark word as good/wrong |
zug zuw |
undo good/wrong |
]s [s |
jump to next/prev misspelled word |
Window & Buffer & Tab |
^wh ^wj
^wk ^wl
|
focus left/lower/upper/right window
|
^wv ^ws |
split vertically/horizontally |
^wc |
close window (not close buffer) |
^wq |
quit window (close buffer) |
|
:bnext
:bprev
|
next/prev buffer
|
|
:tabn
:tabp
|
next/prev tab |
Open & Exit |
:e |
:edit file (open) |
:w |
:write file (save) |
:q |
:quit |
:q! |
quit without saving |
:wq |
write and quit |
:x |
write (if changes) and quit
= :exit
|
ZQ |
= :q! |
:e! |
revert changes |
:qa |
= :quitall
|
ZZ |
= :x |
Operator |
d |
delete (cut) |
y |
yank (copy) |
c |
change (delete then insert) |
g~ |
toggle case |
gu gU |
lowercase/uppercase |
= |
auto-indent |
> < |
shift right/left |
! |
filter through external command |
gq |
format text |
MISC |
u U |
undo last change/line |
^r |
redo |
. |
repeat last command |
|
^o{cmd} |
enter normal mode for one cmd |
|
q: |
open command-line window
^c to close
|