mirror of
https://github.com/junegunn/vim-easy-align.git
synced 2025-11-08 09:53:51 -05:00
fix to process unmatched tokens in right-justficiation mode
This commit is contained in:
@@ -97,7 +97,7 @@ let g:easy_align_delimiters = {
|
||||
Handling unmatched lines
|
||||
------------------------
|
||||
|
||||
EasyAlign by default ignores lines without the matching delimiters.
|
||||
EasyAlign by default ignores lines without the matching delimiters (except in right-justification mode).
|
||||
This is to ignore interleaved comments commonly found in code.
|
||||
|
||||
For example, when aligning the following code block,
|
||||
|
||||
@@ -47,7 +47,7 @@ function! s:do_align(just, fl, ll, fc, lc, pattern, nth, ml, mr, stick_to_left,
|
||||
let suffix = join(tokens[nth + 1: -1], '')
|
||||
|
||||
if match(last, pattern.'$') == -1
|
||||
if !exists("g:easy_align_ignore_unmatched") || g:easy_align_ignore_unmatched
|
||||
if a:just == 0 && (!exists("g:easy_align_ignore_unmatched") || g:easy_align_ignore_unmatched)
|
||||
continue
|
||||
else
|
||||
let delim = ''
|
||||
|
||||
@@ -79,7 +79,8 @@ Defining custom alignment rules *g:easy_align_delimiters*
|
||||
Handling unmatched lines *g:easy_align_ignore_unmatched*
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
EasyAlign by default ignores lines without the matching delimiters.
|
||||
EasyAlign by default ignores lines without the matching delimiters
|
||||
(except in right-justification mode).
|
||||
This is to ignore interleaved comments commonly found in code.
|
||||
|
||||
For example, when aligning the following code,
|
||||
|
||||
Reference in New Issue
Block a user