mirror of
https://github.com/junegunn/vim-easy-align.git
synced 2025-11-11 19:33:50 -05:00
Rename align_mode to mode_sequence
This commit is contained in:
@@ -45,7 +45,7 @@ let s:known_options = {
|
|||||||
\ 'margin_left': [0, 1], 'margin_right': [0, 1], 'stick_to_left': [0],
|
\ 'margin_left': [0, 1], 'margin_right': [0, 1], 'stick_to_left': [0],
|
||||||
\ 'left_margin': [0, 1], 'right_margin': [0, 1], 'indentation': [1],
|
\ 'left_margin': [0, 1], 'right_margin': [0, 1], 'indentation': [1],
|
||||||
\ 'ignores': [3 ], 'ignore_unmatched': [0 ], 'delimiter_align': [1],
|
\ 'ignores': [3 ], 'ignore_unmatched': [0 ], 'delimiter_align': [1],
|
||||||
\ 'align_modes': [1 ]
|
\ 'mode_sequence': [1 ]
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
if exists("*strwidth")
|
if exists("*strwidth")
|
||||||
@@ -115,6 +115,10 @@ function! s:fuzzy_lu(key)
|
|||||||
elseif len(matches) == 1
|
elseif len(matches) == 1
|
||||||
return matches[0]
|
return matches[0]
|
||||||
else
|
else
|
||||||
|
" Avoid ambiguity introduced by deprecated margin_left and margin_right
|
||||||
|
if index(matches, 'mode_sequence') != -1
|
||||||
|
return 'mode_sequence'
|
||||||
|
endif
|
||||||
call s:exit("Ambiguous option key: ". a:key ." (" .join(matches, ', '). ")")
|
call s:exit("Ambiguous option key: ". a:key ." (" .join(matches, ', '). ")")
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
@@ -611,7 +615,7 @@ function! easy_align#align(bang, expr) range
|
|||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let aseq = get(dict, 'align_modes',
|
let aseq = get(dict, 'mode_sequence',
|
||||||
\ recur == 2 ? (mode == 'r' ? ['r', 'l'] : ['l', 'r']) : [mode])
|
\ recur == 2 ? (mode == 'r' ? ['r', 'l'] : ['l', 'r']) : [mode])
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|||||||
Reference in New Issue
Block a user