Skip to content

Instantly share code, notes, and snippets.

@ian-bartholomew
Last active April 7, 2019 20:19
Show Gist options
  • Save ian-bartholomew/8284e5232bfaf3b0c68af4bbb868c498 to your computer and use it in GitHub Desktop.
Save ian-bartholomew/8284e5232bfaf3b0c68af4bbb868c498 to your computer and use it in GitHub Desktop.
Vim cheat sheet

Vim cheat sheet

Movement / Range

Word

w next word 
b prev word 
W next WORD 
B prev WORD 
e end of word 
E end of WORD 

Line

0 begining of line 
$ end of line 
^ begining (non blank) of line 

Paragraph / Block

vip<C-V>$A,<Esc>   Insert , at the end of a line

Window, File

Search

Mode commands

General Commands

EX Commands

Auto Complete

Split Window

^w      followed by capital H,J,K or L will move the current window to the far left,bottom,top or right
^w =    resize all windows to equal size
^w <    resize vertical splits width
^w > 
^w +    resize horizotial split height
^w - 

Buffers

:.,$-bd[elete]    " to delete buffers from the current one to last but one
:%bd[elete]       " to delete all buffers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment