Skip to content

Instantly share code, notes, and snippets.

@MSch
Created July 15, 2010 14:19
Show Gist options
  • Save MSch/476995 to your computer and use it in GitHub Desktop.
Save MSch/476995 to your computer and use it in GitHub Desktop.
Personal Vim cheatsheet
gc{motion} :: Toggle comments (for small comments within one line
the &filetype_inline style will be used, if
defined)
gcc :: Toggle comment for the current line
gC{motion} :: Comment region
\d :: Toggle NerdTREE
,w ,b :: CamelCaseMotion w b
^ :: Move to first character (see 0)
g0, g^, g$ :: Movements, screen line (when line is wrapped)
yssb :: Surround line with ()
cs'" :: Replace surrounding ' with "
cib :: Inner ()
ciB :: Inner {}
ci[ :: Inner []
ci' :: Inner '
ci" :: Inner "
:call pathogen#helptags :: Invoke :helptags on all non-$VIM doc directories in runtimepath.
In Visual Mode
==============
o :: Switch cursor to other side of visual block
Git
====
:Gstatus - for staging, C for commit, then :wq
# vim: set filetype=help:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment