13:be40ec3f034f default tip
Anton Shestakov <av6@dwimlabs.net>, Tue, 21 Jun 2016 14:43:31 +0800
vim.rst: ^R in insert mode allows repeating replace action

previous change 12:e560e97b8c6d

vim.rst

Permissions: -rw-r--r--

Other formats: Feeds:
Column 1
========
Moving
------
`{`, `}`
beginning of *previous*, *next* paragraph
`(`, `)`
beginning of *previous*, *next* sentence
`0`, `gm`
*beginning*, *middle* of line
`^`, `$`
*first*, *last* character of line
`ngg`, `nG`, `:n`
line n, default the *first*, *last*, *exact*
`n%`
percentage n of the file
`n|`
column n of current line
`%`
match of next brace, bracket, comment, #define
`nH`, `nL`
line n from *start*, *bottom* of window
`M`
middle line of window
Editing
-------
`i`, `a`
insert *before*, *after* cursor
`I`, `A`
insert at *beginning*, *end* of line
`gI`
insert text in first column
`o`, `O`
open a new line *below*, *above* the current line
`cc` `S`
change current line
`C`
change to the end of line
`gum`, `gUm`
*lowercase*, *uppercase* text of movement m
Copying
-------
`yy`
yank current line into register
`yiw`
yank current word into register
`p`, `P`
put register *after*, *before* cursor position
`]p` `[p`
like `p`, `P` with indent adjusted
`gp` `gP`
like `p`, `P` leaving cursor after new text
Insert Mode
-----------
`^R`
insert contents of register
`^X^E`, `^X^Y`
scroll one line *up*, *down*
`^N`, `^P`
complete text *before*, *after* cursor
`^X^F`
complete filename
`^X^L`
complete line
`^X^P`
extend completion
`^D`, `^T`
shift *left*, *right* one shift width
Column 2
========
Multiwindowing
--------------
`^Ws` `:split`
split window in two
`^Wv` `:vsplit`
vsplit window in two
`^Wn` `:new`
create new empty window
`^Wo` `:on`
make current window one on screen
`^Wj`, `^Wk`
move to window *below*, *above*
`^Ww`, `^W^W`
move to window *below*, *above* (wrap)
`^Wc` `:close`
close current window
Ex Commands
-----------
`:wn`, `:wN`
write file and edit *next*, *previous* one
`:n`, `:N`
edit *next*, *previous* file in list
`:r f`
insert content of file f below cursor
`:r! c`
insert output of command c below cursor
Misc
----
`K`
lookup keyword under cursor with man
`:make`
start make, read errors and jump to first
`:cn`, `:cp`
display the *next*, *previous* error
`:cl` `:cf`
list all errors, read errors from file
`^L` `^G`
redraw screen, show filename and position
`g^G`
show cursor column, line, and character position
`ga`
show ASCII value of character under cursor
`gf`
open file which filename is under cursor
Column 3
========
Folding
-------
`zfm`
create fold of movement m
`:rfo`
create fold for range r
`zd` `zE`
delete fold at cursor, all in window
`zo`, `zc`, `zO`, `zC`
*open*, *close* one fold; *recursively*
`[z`, `]z`
move to *start*, *end* of current open fold
`zj`, `zk`
move *down*, *up* to *start*, *end* of next fold
Marks
-----
`mc`
mark current position with mark c ∈[a..Z]
`\`c`, `\`C`
go to mark c in *current*, C in *any* file
`\`0..9`
go to last exit position
`\`\``
go to position before jump
`\`"`
go to last edit
`\`[`, `\`]`
go to *start*, *end* of previously operated text
`:marks`
print the active marks list
`:jumps`
print the jump list
`n^O`, `n^I`
go to nth *older*, *newer* position in jump list
Column 4
========
VIM Regex
---------
``\_.``
``.`` and eol
``*``
0 or more
``\+``
1 or more
``\=``
0 or 1
``\{n,m}``
from n to m
``\{n}``
exactly n
``\{n,}``
at least n
``\{,m}``
at most m
``\{-}``
non-greedy ``*``
``\{-n,m}``
non-greedy ``\{n,m}``
``\{-n,}``
non-greedy ``\{n,}``
``\{-,m}``
non-greedy ``\{,m}``
``\v``
very magic