Skip to content

Instantly share code, notes, and snippets.

@johno
Last active August 29, 2015 14:15
Show Gist options
  • Save johno/e57fc05976d124092c28 to your computer and use it in GitHub Desktop.
Save johno/e57fc05976d124092c28 to your computer and use it in GitHub Desktop.
A collection of the vim shortcuts I'm attempting to incorporate into my work flow (muscle memory).

Simple text editing

  • dd delete line
  • daw delete current word
  • caw delete current word, enter insert mode
  • V highlight line
  • u undo
  • ctrl R redo
  • y copy
  • p paste
  • >> indent
  • << unindent
  • o insert a new line
  • D Delete rest of line
  • C Delete rest of line, enter insert mode
  • :set paste To retain clipboard formatting
  • vat Select around tags
  • vit Select in tags

File navigation

  • h left
  • j down
  • k up
  • l right
  • w beginning of word
  • e end of word
  • $ end of line
  • ^ beginning of line
  • :ls list open buffers
  • :b# open buffer by number
  • shift + g end of file
  • :1 top of file
  • } move forward one paragraph
  • { move backward one paragraph

Multiple windows

  • Ctrl W + arrow

Plugins

  • ctrl+p file search
  • emmet-vim ctrl + C-Y + ,
  • nerdtree :NerdTreeToggle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment