mirror of
https://github.com/junegunn/vim-easy-align.git
synced 2025-11-08 18:03:49 -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
|
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.
|
This is to ignore interleaved comments commonly found in code.
|
||||||
|
|
||||||
For example, when aligning the following code block,
|
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], '')
|
let suffix = join(tokens[nth + 1: -1], '')
|
||||||
|
|
||||||
if match(last, pattern.'$') == -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
|
continue
|
||||||
else
|
else
|
||||||
let delim = ''
|
let delim = ''
|
||||||
|
|||||||
@@ -79,7 +79,8 @@ Defining custom alignment rules *g:easy_align_delimiters*
|
|||||||
Handling unmatched lines *g:easy_align_ignore_unmatched*
|
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.
|
This is to ignore interleaved comments commonly found in code.
|
||||||
|
|
||||||
For example, when aligning the following code,
|
For example, when aligning the following code,
|
||||||
|
|||||||
Reference in New Issue
Block a user