Vim Cheatsheet
Basics
| h | j | k | l | gg | G | |
| ⬅ | ⬇ | ⬆ | ➡ | top | bottom |
Copy | Paste | Delete
gg "*y G |
gg %d G |
| Copy All | Delete All |
| Move Forward → | ← Move Backwards | ||
| ➡️ Start of Word | w |
||
| ➡️ Start of Word w/ Punctuation | W |
||
| ➡️ End of Word | e |
||
| ➡️ End of word w/ Punctuation | E |
||
| ➡️ End of LINE | $ | ||
| ➡️ Last non-blank char of LINE | g_ | ||
| ---------------------------------------------------- |
|
||
| Occurrence of character x | fx |
Occurrence of character x | Fx |
| Up | Down | |||
| Move Cursor Up | gk |
Move Cursor Down | gj |
|
| Back 1 Screen | ctrl + b |
Forward 1 Screen | ctrl + f |
|
| Back ½ Screen | ctrl + u |
½ Screen | ctrl + d |
|
| In relation to screen | ||||
| Top of Screen | H |
|||
| Middle of Screen | M |
|||
| Bottom of Screen | L |
|||
| Center | zz |
|||
Delete
You can also us `c` for change instead of delete, which will automatically put you in insert mode
| dw | delete word (to next word start) | dG | delete to end of file | |
| de | delete to End of word | dgg | delete to beginning of file | |
| db | delete back a word | di |
delete between symbol, like (, {, “, etc. | |
| D or d$ | delete from cursor to end of line | dip | delete paragraph | |
| dd or |
delete line or multiple lines | x | delete single character |