Vim Cheatsheet for Beginners
Learn Some Basic Vim Commands

πΉ Modes
Normal mode β (default) for commands & navigation
Insert mode β type text (
i,a,o)Visual mode β select text (
v,V)Command mode β type
:for commands
πΉ File & Exit
| Action | Command |
| Save | :w |
| Quit | :q |
| Save & quit | :wq |
| Quit without saving | :q! |
| Save as⦠| :w filename |
πΉ Insert Text
| Action | Command |
| Insert before cursor | i |
| Insert after cursor | a |
| New line below | o |
| New line above | O |
| Append at end of line | A |
πΉ Navigation
| Action | Command |
| Left / Down / Up / Right | h j k l |
| Start of line | 0 |
| End of line | $ |
| Next word | w |
| Previous word | b |
| End of word | e |
| Go to line N | :N |
| First line | gg |
| Last line | G |
| Half page down / up | Ctrl-d / Ctrl-u |
πΉ Editing
| Action | Command |
| Delete character | x |
| Delete word | dw |
| Delete to end of line | D |
| Delete line | dd |
| Copy (yank) line | yy |
| Paste | p |
| Change word (delete + insert) | cw |
| Replace single character | r<char> |
| Undo | u |
| Redo | Ctrl-r |
πΉ Visual Mode
| Action | Command |
| Start selection | v (char), V (line) |
| Copy | y |
| Delete | d |
| Indent | > |
| Unindent | < |
πΉ Search & Replace
| Action | Command |
| Search forward | /word then n (next), N (prev) |
| Search backward | ?word |
| Replace (line) | :s/old/new/g |
| Replace (file) | :%s/old/new/g |




