Command |
Description |
ESC | in insertMode: switch to command mode in CommandMode: delete CommandBuffer |
i,a,I,A |
switch to insert mode |
s | delete current character and switch to Insert Mode |
o |
add a new line after the current line and switch to insert mode |
O | add a new line before the current line and switch to insert mode |
$ | move to the end of the line |
0 | move the the beginning of the line |
yy | yank (copy) current line |
y | yank (copy) selected text to default buffer (clipboard) |
"ay |
yank (copy) selected text to buffer a |
p | paste text in default buffer |
"ap |
paste text in buffer a |
dd | Delete current line |
dk, d(Up Arrow) |
delete current line and the line above |
dj, d(Down Arrow) | delete current line and the line below |
dw | Delete word |
d$ | Delete to the end of the line |
d0 | Delete to the beginning of the line |
cc,S | Delete current line and switch to insert mode |
cw | Delete to the end of the word and switch to insert mode |
c$ | Delete to the end of the line and switch to insert mode |
c0 | Delete to the beginning of the line and switch to insert mode |
gg | Go to the first line |
G |
Go to the last line |
<n>G | Go to the <n>-th line |
/xxx | search for xxx |
* | search for word under cursor |
# | search for word under cursor backwards |
n | search again with the last search string |
N | search backwards with the last search string |
x | delete current character |
:w | Save file |
:wq | Save file and close editor |
:q | Close editor without saving |
:<nr> | go to line number <nr> |
hjkl | movement keys |
w | move one word forward |
b | move one word backward |
. | repeat last command |
:u |
Undo last change |
u |
Undo last change |
CTRL-R, Z | Redo last undo |
<< |
Shift line left |
>> |
Shift line right |