Vim Cheat Sheet and Syntax Highlighting
Vim Cheat Sheet Saving and Exiting Vim :wq save changes and exit :q! quit changes and exit :q quit and exit provide no changes :x save changes and exit Moving around lines Use arrow keys to move around For laptop users use hjkl: h left l right k up j down <ctrl>+F page up <ctrl>+B page down e end of the word (forward) b begin of the word (backward) w beging of the word (forward) 0 begin of the line $ end of the line H first line of screen L last line of screen :n goto line number Text Editing i inset before cursor a append after cursor A append to the end of current line o open an new line below cursor and inset C change the rest of current line r replace current character e.g. rd replace current character to d Deletion x delete cha under cursor dw delete word dd delete current line d$ delete the rest of the line form cursor Copy and Paste yy copy current line dd delete current line or cut current line ...