Skip to content

Instantly share code, notes, and snippets.

@tjwudi
Last active November 23, 2015 07:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tjwudi/52fff7121038fccd4df7 to your computer and use it in GitHub Desktop.
Save tjwudi/52fff7121038fccd4df7 to your computer and use it in GitHub Desktop.
Vim Bullet Points

Command Mode

  • 'a' - append after the cursor
  • 'A' - append at the end of current line

Commands

  • :vimgrep can help you to search through multiple files. It also tells you where you are now in the search. You can use :copen to see all matches.
  • :vnew Open an empty buffer as a vertical split
  • :%s/old/new/gc Replace all old with new throughout file with confirmations

Key Mappings

  • <c-w> h/j/k/l Switch between split windows
  • <c-w> v/s Split window (vertical & horizontal)
  • <shift-j> Join two lines

Vimdiff

  • From shell run $ vimdiff file1 file2 to see diff of two files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment