Update doc

This commit is contained in:
Junegunn Choi
2013-10-04 01:50:28 +09:00
parent 9d3afa6206
commit 484b4ba5ec
2 changed files with 28 additions and 20 deletions

View File

@@ -225,10 +225,10 @@ key combination.
- `<CTRL-/>` (or `<CTRL-X>` on GVim)
- `[:;]\+`
#### Options in shortcut expression
#### Options in shorthand notation
When you use regular expression in command line, options dictionary can be
written concisely using shortcut expression.
written concisely using shorthand notation.
For example, the command we saw in the previous section,
@@ -238,7 +238,7 @@ can also be written as
- `:EasyAlign*/[:;]\+/s1l0`
Supported shortcut expressions are listed below.
Supported shorthand notations are listed below.
| Expression | Option |
| ---------- | ---------------- |
@@ -250,6 +250,10 @@ Supported shortcut expressions are listed below.
| `m[lrc*]*` | mode_sequence |
| `i[ksdn]` | indentation |
Notice that some option values cannot be expressed in shorthand notation.
- `:EasyAlign*/[:;]\+/s1l0 {'ig': []}`
### Partial alignment in blockwise-visual mode
In blockwise-visual mode (`CTRL-V`), EasyAlign command aligns only the selected

View File

@@ -119,16 +119,16 @@ For example, when aligning the following lines around colons and semi-colons,
try these commands:
- :EasyAlign /[:;]\+/
- :EasyAlign 2/[:;]\+/
- :EasyAlign */[:;]\+/
- :EasyAlign **/[:;]\+/
:EasyAlign /[:;]\+/
:EasyAlign 2/[:;]\+/
:EasyAlign */[:;]\+/
:EasyAlign **/[:;]\+/
Notice that you can't append '\zs' to your regular expression to put delimiters
on the left. It can be done by providing additional options in Vim dictionary
format.
- :EasyAlign * /[:;]\+/ { 'stick_to_left': 1, 'left_margin': 0 }
:EasyAlign * /[:;]\+/ { 'stick_to_left': 1, 'left_margin': 0 }
Then we get:
@@ -137,33 +137,33 @@ Then we get:
Option names are fuzzy-matched, so you can write as follows:
- :EasyAlign * /[:;]\+/ { 'stl': 1, 'l': '' }
:EasyAlign * /[:;]\+/ { 'stl': 1, 'l': '' }
You can even omit spaces between the arguments, so concisely (or cryptically):
- :EasyAlign*/[:;]\+/{'s':1,'l':''}
:EasyAlign*/[:;]\+/{'s':1,'l':''}
The same thing can be done in the interactive mode as well with the following
key combination.
- <Enter>
- *
- <Left>
- <CTRL-/> (or <CTRL-X> on GVim)
- [:;]\+
- <Enter>
- *
- <Left>
- <CTRL-/> (or <CTRL-X> on GVim)
- [:;]\+
When you use regular expression in command line, options dictionary can be
written concisely using shortcut expression.
written concisely using shorthand notation.
For example, the command we saw in the previous section,
- :EasyAlign*/[:;]\+/{'s':1,'l':0}
:EasyAlign*/[:;]\+/{'s':1,'l':0}
can also be written as
- :EasyAlign*/[:;]\+/s1l0
:EasyAlign*/[:;]\+/s1l0
Supported shortcut expressions are listed below.
Supported shorthand notations are listed below.
| Expression | Option |
| ---------- | -------------- |
@@ -172,9 +172,13 @@ Supported shortcut expressions are listed below.
| s[01] | stick_to_left |
| u[01] | ignore_unmatched |
| d[lrc] | delimiter_align |
| m[lrc*]* | mode_sequence |
| m[lrc*]+ | mode_sequence |
| i[ksdn] | indentation |
Notice that some option values cannot be expressed in shorthand notation.
:EasyAlign*/[:;]\+/s1l0 {'ig': []}
Partial alignment in blockwise-visual mode
-------------------------------------------------------------------------