mirror of
https://github.com/junegunn/vim-easy-align.git
synced 2025-11-16 13:53:50 -05:00
Implement shortcut expression for options
This commit is contained in:
@@ -100,7 +100,7 @@ described in the following sections.
|
||||
| <Down> | *_margin | { 'left_margin': 0, 'right_margin': 0 } |
|
||||
|
||||
|
||||
Non-interactive mode
|
||||
Non-interactive mode (command line)
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Instead of going into the interactive mode, you can type in arguments to
|
||||
@@ -152,6 +152,29 @@ key combination.
|
||||
- <CTRL-/> (or <CTRL-X> on GVim)
|
||||
- [:;]\+
|
||||
|
||||
When you use regular expression in command line, options dictionary can be
|
||||
written concisely using shortcut expression.
|
||||
|
||||
For example, the command we saw in the previous section,
|
||||
|
||||
- :EasyAlign*/[:;]\+/{'s':1,'l':0}
|
||||
|
||||
can also be written as
|
||||
|
||||
- :EasyAlign*/[:;]\+/s1l0
|
||||
|
||||
Supported shortcut expressions are listed below.
|
||||
|
||||
| Expression | Option |
|
||||
| ---------- | -------------- |
|
||||
| l[0-9] | left_margin |
|
||||
| r[0-9] | right_margin |
|
||||
| s[01] | stick_to_left |
|
||||
| u[01] | ignore_unmatched |
|
||||
| d[lrc] | delimiter_align |
|
||||
| m[lrc*]* | mode_sequence |
|
||||
| i[ksdn] | indentation |
|
||||
|
||||
|
||||
Partial alignment in blockwise-visual mode
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user