Update vim.

This commit is contained in:
Rico Sta. Cruz 2012-11-16 06:06:20 +08:00
parent eb37e2bdb0
commit 85d3a040e5
2 changed files with 48 additions and 52 deletions

View File

@ -5,5 +5,5 @@ end
desc "Deploy" desc "Deploy"
task :deploy => :build do task :deploy => :build do
system "git update-ghpages rstacruz/cheatsheets -i _output" system "git update-ghpages rstacruz/cheatsheets -i _output --force"
end end

98
vim.md
View File

@ -1,86 +1,82 @@
title: vim title: vim
---- ----
. - repeat last command
]p - paste under the current indentation level
`. - Go to last edit
`` - Go to last jump
C-o - Go back to previous location (C-i forward)
C-t - Go back to last tag
Command line Command line
------------ ------------
<C-r><C-w> - insert current word into the command line <C-r><C-w> # insert current word into the command line
<C-r>" - paste from " register <C-r>" # paste from " register
Motions Motions
------- -------
vip - Select paragraph vip # Select paragraph
vipipipip - Select more vipipipip # Select more
ap - a paragraph ap # a paragraph
ip - inner paragraph ip # inner paragraph
ap, ip - Paragraph ap, ip # Paragraph
aw, iw - Word aw, iw # Word
as, is - Sentence as, is # Sentence
ab - A block [( ab # A block [(
aB - A block in [{ aB # A block in [{
at - A XML tag block at # A XML tag block
a[ ( { < - A [], (), or {} block a[ ( { < # A [], (), or {} block
a' " ` - A quoted string a' " ` # A quoted string
Example: Example:
yip - Yank inner paragraph yip # Yank inner paragraph
yap - Yank paragraph (including newline) yap # Yank paragraph (including newline)
Folds Folds
----- -----
zo - Open zo # Open
zO - Open, recursive zO # Open, recursive
zc - Close zc # Close
zC - Close, recursive zC # Close, recursive
za - Toggle za # Toggle
zA - Toggle, recursive zA # Toggle, recursive
zv - Open folds for this line zv # Open folds for this line
zM - Close all zM # Close all
zR - Open all zR # Open all
zm - Fold more (foldlevel += 1) zm # Fold more (foldlevel += 1)
zr - Fold less (foldlevel -= 1) zr # Fold less (foldlevel -= 1)
zx - Update zx # Update
Scrolling Misc
--------- ----
zz - Center this line . # repeat last command
]p # paste under the current indentation level
C-o # Go back to previous location (C-i forward)
C-t # Go back to last tag
zz # Center this line
`. # Go to last edit
`` # Go to last jump
Windows Windows
------- -------
z{height}<Cr> - Resize pane to {height} lines tall z{height}<Cr> # Resize pane to {height} lines tall
Tags Tags
---- ----
^] - Jump to definition ^] # Jump to definition
g] - See all definitions g] # See all definitions
^O ^I - Back/forward ^O ^I # Back/forward
:tselect Classname - Find definitions of Classname :tselect Classname # Find definitions of Classname
:tjump Classname - Find definitions of Classname (auto-select 1st) :tjump Classname # Find definitions of Classname (auto-select 1st)
:tag Classname - Jump to first definition of Classname :tag Classname # Jump to first definition of Classname
## My own customizations
va{= - reindent block