mirror of
https://github.com/junegunn/vim-easy-align.git
synced 2025-11-16 22:03:41 -05:00
Implement live interactive mode (#15)
This commit adds LiveEasyAlign command. (The name was chosen not to introduce ambiguity when typing in only the prefix of the command: e.g. `:EasyA*|`) In live interactive mode, the selected text is aligned on-the-fly as the user type in. In order to finalize the alignment, the user has to type in the same delimiter key again. (Or CTRL-X on regular expressions)
This commit is contained in:
@@ -26,4 +26,5 @@ if exists("g:loaded_easy_align_plugin")
|
||||
endif
|
||||
let g:loaded_easy_align_plugin = 1
|
||||
|
||||
command! -nargs=* -range -bang EasyAlign <line1>,<line2>call easy_align#align('<bang>' == '!', <q-args>)
|
||||
command! -nargs=* -range -bang EasyAlign <line1>,<line2>call easy_align#align('<bang>' == '!', 0, <q-args>)
|
||||
command! -nargs=* -range -bang LiveEasyAlign <line1>,<line2>call easy_align#align('<bang>' == '!', 1, <q-args>)
|
||||
|
||||
Reference in New Issue
Block a user