Download:
child 3:b876b898560b
parent 1:794840b6d903
2:7493e26a3304
Anton Shestakov <engored@ya.ru>, Sun, 14 Sep 2014 22:33:16 +0900
More cheatable wisdom.

1 файлов изменено, 185 вставок(+), 6 удалений(-) [+]
source.rst file | annotate | diff | comparison | revisions
--- a/source.rst Sun Sep 14 15:34:02 2014 +0900
+++ b/source.rst Sun Sep 14 22:33:16 2014 +0900
@@ -17,7 +17,7 @@
`^` `$`
*first*, *last* character of line
-`ngg` `nG`
+`ngg` `nG` `:n`
line n, default the *first*, *last*
`n%`
@@ -36,6 +36,28 @@
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
-------
@@ -81,9 +103,104 @@
========
+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)
+
+`^Wq`
+ 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
+-----------
+
+`^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
@@ -117,14 +234,72 @@
``\{-,m}``
non-greedy ``\{,m}``
+``\v``
+ very magic
-Column 3
-========
+
+Formatting %
+------------
+
+.. %, mapping, conversion, min width, precision, length, type
+
+``%[(<name>)]`` *|* ``[#0- +][<min width 0-9*>][.<0-9*>][<length>]dioxXeEfFgGcrs``
+
+``#``
+ the value conversion will use the “alternate form” (where defined below)
+
+``0``
+ the conversion will be zero padded for numeric values
+
+``-``
+ the converted value is left adjusted (overrides the '0' conversion if both
+ are given)
+
+``␣``
+ (a space) a blank should be left before a positive number (or empty string)
+ produced by a signed conversion
+
+``+``
+ a sign character ('+' or '-') will precede the conversion (overrides a
+ “space” flag)
+
+``d`` ``i``
+ signed integer decimal
+
+``o``
+ signed octal value
+
+``x`` ``X``
+ signed hexadecimal *lowercase*, *uppercase*
+
+``e`` ``E``
+ floating point exponential format *lowercase*, *uppercase*
+
+``f`` ``F``
+ floating point decimal format
+
+``g`` ``G``
+ floating point format. Uses *lowercase*, *uppercase* exponential format if
+ exponent is less than -4 or not less than precision, decimal format
+ otherwise
+
+``c``
+ single character (accepts integer or single character string)
+
+``r``
+ string (converts any Python object using repr())
+
+``s``
+ string (converts any Python object using str())
re Extensions
-------------
+.. raw:: html
+
+ <div style="max-width: 600px;">
+
``(?iLmsux)``
the group matches the empty string; the letters set the corresponding flags
@@ -143,13 +318,13 @@
the contents of the parentheses are simply ignored
``(?=...)``
- matches next, but doesn't consume any of the string (lookahead assertion)
+ lookahead assertion: matches next, but doesn't consume any of the string
``(?!...)``
negative lookahead assertion
``(?<=...)``
- matches a preceding string (lookbehind assertion)
+ lookbehind assertion: matches a preceding string
``(?<!...)``
negative lookbehind assertion, patterns which start with it may match at
@@ -158,4 +333,8 @@
.. break the list
``(?(id/name)yes-pattern|no-pattern)``
- magic. ``(<)?(\w+@\w+(?:\.\w+)+)(?(1)>)``
+ sorcery. ``(<)?(\w+@\w+(?:\.\w+)+)(?(1)>)``
+
+.. raw:: html
+
+ </div>