Make <Down> set both left and right margin to zero

(Undocumented) <Up> will clear *UP* left_margin, right_margin, and stick_to_left
This commit is contained in:
Junegunn Choi
2013-10-03 16:06:23 +09:00
parent e4f86274e3
commit 3304f4e95a
3 changed files with 7 additions and 1 deletions

View File

@@ -629,9 +629,13 @@ function! s:interactive(modes, vis, opts, delims)
elseif c == "\<Right>"
let opts['stl'] = 0
let opts['lm'] = 1
elseif c == "\<Up>" || c == "\<Down>"
elseif c == "\<Down>"
let opts['lm'] = 0
let opts['rm'] = 0
elseif c == "\<Up>"
silent! call remove(opts, 'stl')
silent! call remove(opts, 'lm')
silent! call remove(opts, 'rm')
elseif ch == "\<C-O>"
let modes = tolower(s:input("Mode sequence: ", get(opts, 'm', mode), a:vis))
if match(modes, '^[lrc]\+\*\{0,2}$') != -1