From 6dfe45d478124e3816156cb348ff835e933b134b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Tue, 13 Oct 2015 23:49:01 +0200 Subject: [PATCH] More improvements to dsc (#245) --- autoload/vimtex/change.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/autoload/vimtex/change.vim b/autoload/vimtex/change.vim index b84218f..0af135d 100644 --- a/autoload/vimtex/change.vim +++ b/autoload/vimtex/change.vim @@ -70,7 +70,7 @@ function! vimtex#change#get_command(...) " {{{1 elseif l:syntax ==# 'texMatcher' \ || (l:syntax ==# 'Delimiter' && l:char =~# '{\|}') let l:curpos = getcurpos() - normal! vaBoh + keepjumps normal! vaBoh let l:result = vimtex#change#get_command(searchpos('\S', 'bcn')) call setpos('.', l:curpos) return l:result @@ -136,7 +136,8 @@ function! vimtex#change#command_delete() " {{{1 " Delete surrounding braces if present if getline('.')[l:col-1 :] =~# '^\s*{' - normal! f{vaBm`oxg``x + call searchpos('{', 'c') + keepjumps normal! vaBmzoxg`zx if l:line == l:curpos[1] let l:curpos[2] -= 1 if l:curpos[2] < 0