Commands from VimTutor
A list of commands from the VimTutor lesson
Exiting Vim
:q
› Exit if no changes were made
:q!
› Exit Vim and discard all changes
:wq
› Save changes and exit the file
:w
› Save the file.
Editing and Navigation
k
› Move up
h
› Move left
l
› Move right
j
› Move down
x
› Deletes the character under the cursor
i
› Enter INSERT MODE to the left of the cursor
a
› Enter INSERT MODE to the right of the cursor
w
› Move to the first character of the next word
e
› Move to the last character of the next word
b
› Move to the first character of the previous word
0
[zero] › Move to the first character of the line
$
› Move to the last character of the line
gg
› Go to the top of the file
G
› Go to the bottom of the file
o
[lowercase o] › Insert a new line below and enter INSERT MODE
O
[uppercase O] › Insert a new line above and enter INSERT MODE
dd
› Delete the current line
dw
› Delete from the cursor to the end of the word
d$
› Delete from the cursor to the end of the line
u
› Undo the last action