Skip to content

Instantly share code, notes, and snippets.

@chrisloftus
Last active June 28, 2016 15:56
Show Gist options
  • Save chrisloftus/68bfb1e166ecee6d5562 to your computer and use it in GitHub Desktop.
Save chrisloftus/68bfb1e166ecee6d5562 to your computer and use it in GitHub Desktop.
Vim cheatsheet

Vim Commands

  • set number show line numbers

  • :m 12 move current line to line 12

  • :5,8m 2 move lines 5-8 to after line 2

  • :!{command} execute unix command from vim

  • /{query} search forward

  • ?{query} search backward

  • n next

  • N previous

  • * find next occurence of word cursor is on

  • y yank (copy)

  • p paste

  • >> to indent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment