Skip to content

Instantly share code, notes, and snippets.

@marcusbaguley
Created June 20, 2011 21:14
Show Gist options
  • Save marcusbaguley/1036601 to your computer and use it in GitHub Desktop.
Save marcusbaguley/1036601 to your computer and use it in GitHub Desktop.
VIM cheat sheet
u undo
C R redo
C ^ previous
C p complete
move foward and back methods
SHIFT {
SHIFT }
Shell
:! unix command % (% is the current file)
Macros
qr
q
@r replay register r
NN@reg replay NN times
Copy and Paste
C v
d (delete)
p (paste after)
P (paste before)
or using registers
ma Mark register a
d'a Delete to this point
p Paste
Source format
v
Mark area
=
Search/Replace
:%s/foo/barr/gcI (glocal cconfirm IgnoreCase)
$ end of line
0 beginning of line
Vertical (column) selecting
C v (visual mode)
I (type in text)
ESC
Help File
C ] Jump to a subject
C T or C O
C I / C O Next Previous
Buffer
:bw Close buffer
:grep word
cn Next match
Rails
Redit, Rmodel, Rcontroller {pattern}
:2,3Rextract partialName Extract rhte range into a partial
Rtree NerdTree F2
CommandT
C x Cancel
TAB Switch between select and search
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment