Vim
Basic Commands
Open a file in VIM
Exit VIM
In command mode:
:q
Quit without saving:
:q!
Save and quit:
:wq
Save a file
Save and quit VIM
Navigation
Move cursor up, down, left, or right
Up:
k
Down:
j
Left:
h
Right:
l
Go to the beginning of the line
Go to the end of the line
Go to a specific line number
Editing
Switch to insert mode (start editing)
Delete a character
Delete a word
Delete an entire line
Undo last change
Redo the last undone change
Copy & Paste
Copy (yank) a line
Paste the copied line below the cursor
Paste the copied line above the cursor
Search & Replace
Search for a word
Search and replace in the file
Move to the next occurrence of a search result
Move to the previous occurrence of a search result
Visual Mode
Select text to copy or delete
Select entire lines
Select a block of text
Miscellaneous
Open a new file
Close current file and open a new file
View line numbers
Hide line numbers