Cheatsheet for Vim Tutor.
Vim Tutor comes installed with most modern MacOS and Linux distributions. To run it, enter vimtutor
in the terminal.
For Windows there should be an entry in the start menu folder titled "vim tutor" if you install Vim.
- The cursor is moved using either the arrow keys or the
h j k l
keys.h
: leftj
: downk
: upl
: right
- To start Vim from the shell prompt type:
vim FILENAME <ENTER>
- To exit Vim, type:
<ESC> :q! <ENTER>
to trash all changes<ESC> :wq <ENTER>
to save the changes
- To delete the character at the cursor, type:
x
- To insert or append text, type:
i
type inserted text<ESC>
(insert before the cursor)A
type appended text<ESC>
(append after the line)
Note: Pressing <ESC>
will place you in NORMAL
mode or will cancel an unwanted and partially completed command.