Vim

Changing mode

i - entering insertion mode v - entering visual mode ESC - exiting current mode and switch to normal node

Exiting

In Normal Mode: :q - quit the opened file if there are no unsaved changes :q!- force quit without saving the current changes :w - write (save) the file :x - write and exit the file

Copy (Yank), Cut (delete) and Paste (put) in Normal Mode

Yank

yy - copy current line

Delete

dd - delete current line

Put

p - put the yanked or deleted text after the cursor P - put the yanked or deleted text before the cursor

Moving in the file

gg - Move at the beginning of the file G - Move at the end of the file