x | delete N chars under and after cursor | press x once |
w | cursor N words forward | press w once |
a | append text after the cursor N times | press a once |
n | repeat the latest ‘/’ or ‘?’ N times | press n once |
N | repeat the latest ‘/’ or ‘?’ N times in opposite direction | press shift & n |
p | put the text after the cursor N times | press p once |
G | cursor to line N, default last line | press shift & g |
gg | cursor to line N, default first line start Select mode | press gg |
A | append text after the end of the line N times | press shift & a |
C | change from the cursor position to the end of the line, and N-1 more lines | press shift & c |
R | enter replace mode | press shift & r |
s | (substitue)delete N chars and start insert | press s |
S | delete N lines and start insert; synonym “cc” | press shift&s |
o | begin a new line below the cursor and insert text, repeat N times | press o |
O | begin a new line above the cursor and insert text, repeat N times | press shift&o |
b | cursor N words backward | press b |
>{motion} | shift Nmove lines one ‘shiftwidth’ rightwards | press > |
d{motion} | delete Nmove text | press d then any keys associated with motions |
gu{motion} | make lowercace | press g & u then {motion} |
gU{motion} | make uppercace | press g & U then {motion} |
c{motion} | delete Nmove text and start insert | press c |
d{motion} | delete N move txt | press d once |
y{motion} | yank Nmove text | press y |
r{char} | replace N chars with {char} | press r & {char} |
f{char} | cursor to the Nth occurrence of {char} to the left | press f then any single char |
F{char} | cursor to the Nth occurrence of {char} to the left | press F & {char} |
` {A-Za-z} | cursor to the mark {a-zA-Z0-9} | press ` and any char |
m{A-Za-z} | set mark {A-Za-z} at cursor position | press m then {A-Za-z} |
t{char} | cursor till before Nth occurrence of {char} to the left | press t & {char} |
T{char} | cursor till after Nth occurrence of {char} to the right | press T & {char} |
gr{char} | virtual replace N chars with {char} | press g & r & {char} |
gR | enter virtual replace mode | press g & R |
ga | print ascii value of character under the cursor | press g & a |
g<C-]> | same as :tjump to the tag under the cursor | press g then press Ctrl&] same time |
^ | cursor to the first CHAR of the line | press ^ |
$ | cursor to the end of Nth next line | press $ |
* | search forward for the Nth occurrence of the ident under cursor | press * |
. | repeat the last change with count replaced with N | press . |
: | use command-line mode to execute an Ex command | press / |
/ | use command-line mode to perform a forward search | press / |
? | use command-line mode to perform a backward search | press ? |
= | use command-line mode to evaluate a Vim script expression | press = |
; | repeat latest f, t, F or T N times | press ; |
, | repeat latest f, t, F or T in opposite direction N times | press , |
@: | repeat the previous “:” command N times | press @&: |
& | repeat last : s | press & |
<C-]> | ta to ident under cursor | press Ctrl & ] |
<C-N> | same as “j”, cursor N lines downward | press Ctrl&N same time |
<C-R> | same as “u”, redo changes which were undone with ‘u’ | press Ctrl&R |
<C-=> | zoom windows | press Ctrl&W & Ctrl&= |
<C-W>= | make all windows same height & width | press Ctrl&W and = |
<CR> | press the carriage return key (also known as <Enter>) | |
<C-L> | redraw screen | press Ctrl&L |