Update vim.
This commit is contained in:
parent
eb37e2bdb0
commit
85d3a040e5
2
Rakefile
2
Rakefile
|
@ -5,5 +5,5 @@ end
|
|||
|
||||
desc "Deploy"
|
||||
task :deploy => :build do
|
||||
system "git update-ghpages rstacruz/cheatsheets -i _output"
|
||||
system "git update-ghpages rstacruz/cheatsheets -i _output --force"
|
||||
end
|
||||
|
|
98
vim.md
98
vim.md
|
@ -1,86 +1,82 @@
|
|||
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
|
||||
------------
|
||||
|
||||
<C-r><C-w> - insert current word into the command line
|
||||
<C-r>" - paste from " register
|
||||
<C-r><C-w> # insert current word into the command line
|
||||
<C-r>" # paste from " register
|
||||
|
||||
Motions
|
||||
-------
|
||||
|
||||
vip - Select paragraph
|
||||
vipipipip - Select more
|
||||
vip # Select paragraph
|
||||
vipipipip # Select more
|
||||
|
||||
ap - a paragraph
|
||||
ip - inner paragraph
|
||||
ap # a paragraph
|
||||
ip # inner paragraph
|
||||
|
||||
ap, ip - Paragraph
|
||||
aw, iw - Word
|
||||
as, is - Sentence
|
||||
ap, ip # Paragraph
|
||||
aw, iw # Word
|
||||
as, is # Sentence
|
||||
|
||||
ab - A block [(
|
||||
aB - A block in [{
|
||||
at - A XML tag block
|
||||
a[ ( { < - A [], (), or {} block
|
||||
a' " ` - A quoted string
|
||||
ab # A block [(
|
||||
aB # A block in [{
|
||||
at # A XML tag block
|
||||
a[ ( { < # A [], (), or {} block
|
||||
a' " ` # A quoted string
|
||||
|
||||
Example:
|
||||
|
||||
yip - Yank inner paragraph
|
||||
yap - Yank paragraph (including newline)
|
||||
yip # Yank inner paragraph
|
||||
yap # Yank paragraph (including newline)
|
||||
|
||||
Folds
|
||||
-----
|
||||
|
||||
zo - Open
|
||||
zO - Open, recursive
|
||||
zc - Close
|
||||
zC - Close, recursive
|
||||
za - Toggle
|
||||
zA - Toggle, recursive
|
||||
zo # Open
|
||||
zO # Open, recursive
|
||||
zc # Close
|
||||
zC # Close, recursive
|
||||
za # Toggle
|
||||
zA # Toggle, recursive
|
||||
|
||||
zv - Open folds for this line
|
||||
zv # Open folds for this line
|
||||
|
||||
zM - Close all
|
||||
zR - Open all
|
||||
zM # Close all
|
||||
zR # Open all
|
||||
|
||||
zm - Fold more (foldlevel += 1)
|
||||
zr - Fold less (foldlevel -= 1)
|
||||
zm # Fold more (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
|
||||
-------
|
||||
|
||||
z{height}<Cr> - Resize pane to {height} lines tall
|
||||
z{height}<Cr> # Resize pane to {height} lines tall
|
||||
|
||||
Tags
|
||||
----
|
||||
|
||||
^] - Jump to definition
|
||||
g] - See all definitions
|
||||
^O ^I - Back/forward
|
||||
^] # Jump to definition
|
||||
g] # See all definitions
|
||||
^O ^I # Back/forward
|
||||
|
||||
:tselect Classname - Find definitions of Classname
|
||||
:tjump Classname - Find definitions of Classname (auto-select 1st)
|
||||
:tag Classname - Jump to first definition of Classname
|
||||
|
||||
## My own customizations
|
||||
|
||||
va{= - reindent block
|
||||
:tselect Classname # Find definitions of Classname
|
||||
:tjump Classname # Find definitions of Classname (auto-select 1st)
|
||||
:tag Classname # Jump to first definition of Classname
|
||||
|
|
Loading…
Reference in New Issue