Input Commands |
|
|
i |
Insert before cursor |
|
I |
Insert at start of line |
|
a |
Append after cursor |
|
A |
Append to end of line |
|
o |
Open new line below cursor |
|
O |
Open new line above cursor |
|
Save & Quit Editing |
|
|
zz |
Write file and exit |
|
:wq |
Write file and exit |
|
:wq! |
Write file, exit and override RO |
|
:w file |
Write to file |
|
:q |
Quit if no changes were made |
|
:q! |
Quit and lose changes |
|
:r file |
Read from file |
|
:! command |
Execute command in shell |
Miscellaneous |
|
|
[Esc] |
Cancel |
|
: |
“Last Line” mode |
|
. |
Repeat last change |
|
J |
Join two lines |
Edit Commands |
|
|
x |
Delete character |
|
dw |
Delete rest of word |
|
dd |
Delete line |
|
d$ |
Delete to end of line |
|
yl |
Yank character |
|
yw |
Yank rest of word |
|
yy |
Yank line |
|
y$ |
Yank to end of line |
|
p |
Paste after cursor |
|
P |
Paste before cursor |
|
cw |
Change rest of word |
|
cc |
Change line |
|
c$ |
Change to end of line |
|
r |
Replace character at cursor |
|
R |
Replace until [Esc] is pressed |
|
u |
Undo last change |
|
U |
Undo all changes on current line |
|
Movement Commands |
|
|
h |
Left |
|
j |
Down |
|
k |
Up |
|
l |
Right |
|
w |
Forward one word |
|
b |
Backward one word |
|
e |
End of word |
|
^ |
Beginning of text on line |
|
O |
Beginning of line |
|
$ |
End of line |
|
H |
Top of screen |
|
L |
Bottom of screen |
|
M |
Middle line of screen |
|
G |
Bottom of file |
|
XG |
Goto line x |
|
[CTRL] + F |
Scroll forward |
|
[CTRL] + B |
Scroll backward |
|
[CTRL] + D |
Scroll down ½ screen |
|
[CTRL] + U |
Scroll up ½ screen |
|
[CTRL] + L |
Redraw Screen |
|
Searching |
|
|
/ |
Search forward |
|
? |
Search backward |
|
N |
Search for next occurrence |
|
N |
Search for previous occurrence |