mirror of
https://github.com/junegunn/vim-easy-align.git
synced 2025-11-12 11:53:49 -05:00
Left-align delimiters of different lengths when stick_to_left is set
This commit is contained in:
@@ -185,7 +185,12 @@ function! s:do_align(just, all_tokens, fl, ll, fc, lc, pattern, nth, ml, mr, sti
|
|||||||
let tokens[nth] = token
|
let tokens[nth] = token
|
||||||
|
|
||||||
" Pad the delimiter
|
" Pad the delimiter
|
||||||
let delim = repeat(' ', max_delim_len - s:strwidth(delim)). delim
|
let dpad = repeat(' ', max_delim_len - s:strwidth(delim))
|
||||||
|
if a:stick_to_left
|
||||||
|
let rpad = rpad . dpad
|
||||||
|
else
|
||||||
|
let delim = dpad . delim
|
||||||
|
endif
|
||||||
|
|
||||||
" Before and after the range (for blockwise visual mode)
|
" Before and after the range (for blockwise visual mode)
|
||||||
let cline = getline(line)
|
let cline = getline(line)
|
||||||
|
|||||||
Reference in New Issue
Block a user