6:33cf8f66683a
Anton Shestakov <engored@ya.ru>, Mon, 15 Sep 2014 13:04:46 +0900
More on vim.

next change 7:093d5397496b
previous change 3:b876b898560b

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*
`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
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
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` `Y`
yank current line 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
Column 2
========
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
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
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
Insert Mode
-----------
`^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 3
========
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