mirror of
https://github.com/junegunn/vim-easy-align.git
synced 2025-11-10 19:03:50 -05:00
support backspace in interactive mode
This commit is contained in:
@@ -36,7 +36,6 @@ function! s:do_align(just, fl, ll, fc, lc, pattern, nth, ml, mr, stick_to_left,
|
|||||||
let tokens = extend([join(tokens[0:1], '')], tokens[2:-1])
|
let tokens = extend([join(tokens[0:1], '')], tokens[2:-1])
|
||||||
endif
|
endif
|
||||||
let max_tokens = max([len(tokens), max_tokens])
|
let max_tokens = max([len(tokens), max_tokens])
|
||||||
|
|
||||||
if a:nth > 0
|
if a:nth > 0
|
||||||
if len(tokens) < a:nth
|
if len(tokens) < a:nth
|
||||||
continue
|
continue
|
||||||
@@ -125,6 +124,10 @@ function! easy_align#align(just, ...) range
|
|||||||
let ch = nr2char(c)
|
let ch = nr2char(c)
|
||||||
if c == 3 || c == 27
|
if c == 3 || c == 27
|
||||||
return
|
return
|
||||||
|
elseif c == '<27>kb'
|
||||||
|
if len(n) > 0
|
||||||
|
let n = strpart(n, 0, len(n) - 1)
|
||||||
|
endif
|
||||||
elseif c == 13
|
elseif c == 13
|
||||||
let just = (just + 1) % len(s:just)
|
let just = (just + 1) % len(s:just)
|
||||||
elseif c == 45
|
elseif c == 45
|
||||||
|
|||||||
Reference in New Issue
Block a user