Skip to content

Instantly share code, notes, and snippets.

@zhaidongplus
Last active December 14, 2015 14:08
Show Gist options
  • Save zhaidongplus/5097994 to your computer and use it in GitHub Desktop.
Save zhaidongplus/5097994 to your computer and use it in GitHub Desktop.

Vim Cheat Sheet

Basic

:e filename: Open a new file

:w filename: Write the file

:q: Quit

:q!: Quit without saving changes.

:wq: Write the file and exit.


h,j,k,l: Move

i,I: Insert

a,A: Append

o,O: Open a new line

x,X: Delete character

dd: Delete the current line

u: Undo

:BundleList: List configured bundles

:BundleInstall(!): Install(update) bundles

:BundleSearch(!) foo: Search(or refresh cache first) for foo

:BundleClean(!): Confirm(or auto-approve) removal of unused bundles

<Leader> + <Leader> + w: Trigger the word motion

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