Update EXAMPLES.md

This commit is contained in:
Junegunn Choi
2013-08-12 01:56:08 +09:00
parent 7d031956ab
commit 96608ee5ef

View File

@@ -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,