mirror of
https://github.com/junegunn/vim-easy-align.git
synced 2025-11-10 10:53:49 -05:00
Update EXAMPLES.md
This commit is contained in:
23
EXAMPLES.md
23
EXAMPLES.md
@@ -262,22 +262,25 @@ In this case, the second line is ignored as it doesn't contain a `#`. (The one
|
|||||||
highlighted as String is ignored.) If you don't want the second line to be
|
highlighted as String is ignored.) If you don't want the second line to be
|
||||||
ignored, there are three options:
|
ignored, there are three options:
|
||||||
|
|
||||||
1. Set `g:easy_align_ignore_unmatched` to 0
|
1. Set global `g:easy_align_ignore_unmatched` flag to 0
|
||||||
2. Use the following commands:
|
2. Use `:EasyAlign` command with `ignore_unmatched` option
|
||||||
|
3. Update the alignment rule with `ignore_unmatched` option
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
" Using predefined rule with delimiter key #
|
" 1. Set global g:easy_align_ignore_unmatched to zero
|
||||||
" - "iu" is fuzzy-matched to "*i*gnore_*u*nmatched"
|
let g:easy_align_ignore_unmatched = 0
|
||||||
|
|
||||||
|
" 2. Using :EasyAlign command with ignore_unmatched option
|
||||||
|
" 2-1. Using predefined rule with delimiter key #
|
||||||
|
" - "iu" is fuzzy-matched to "*i*gnore_*u*nmatched"
|
||||||
:EasyAlign#{'iu':0}`
|
:EasyAlign#{'iu':0}`
|
||||||
|
|
||||||
" Using regular expression /#/
|
" 2-2. Using regular expression /#/
|
||||||
:EasyAlign/#/{'is':['String'],'iu':0}`
|
:EasyAlign/#/{'is':['String'],'iu':0}`
|
||||||
```
|
|
||||||
|
|
||||||
3. Update the rule with `ignore_unmatched`
|
" 3. Update the alignment rule with ignore_unmatched option
|
||||||
|
let g:easy_align_delimiters['#'] = {
|
||||||
```vim
|
\ 'pattern': '#', 'ignores': ['String'], 'ignore_unmatched': 0 } }
|
||||||
let g:easy_align_delimiters['#'] = { 'pattern': '#', 'ignores': ['String'], 'ignore_unmatched': 0 } }
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Then we get,
|
Then we get,
|
||||||
|
|||||||
Reference in New Issue
Block a user