Vim Cheat Sheet
A Great Vim Cheat Sheet Essentials Cursor movement (Normal/Visual Mode) h j k l - Arrow keys w / b - Next/previous word W / B - Next/previous word (space seperated) e / ge - Next/previous end of word 0 / $ - Start/End of line ^ - First non-blank character of line (same as 0w) Editing text i / a - Start insert mode at/after cursor I / A - Start insert mode at the beginning/end of the line o / O - Add blank line below/above current line Esc or Ctrl+[ - Exit insert mode d - Delete dd - Delete line c - Delete, then start insert mode cc - Delete line, then start insert mode Operators Operators also work in Visual Mode d - Deletes from the cursor to the movement location c - Deletes from the cursor to the movement location, then starts insert mode y - Copy from the cursor to the movement location > - Indent one level < - Unindent one level You can also combine operators with motions. Ex: d$ deletes from the cursor to the end of the line. Marking text (visual mode) v - Start visual mode V - Start linewise visual mode Ctrl+v - Start visual block mode Esc or Ctrl+[ - Exit visual mode Clipboard yy - Yank (copy) a line p - Paste after cursor P - Paste before cursor dd - Delete (cut) a line x - Delete (cut) current character X - Delete (cut) previous character d / c - By default, these copy the deleted text Exiting :w - Write (save) the file, but don’t quit :wq - Write (save) and quit :q - Quit (fails if anything has changed) :q!