mirror of
https://github.com/Raimondi/delimitMate.git
synced 2026-01-21 10:32:18 +08:00
Fix problem with jumping over an existing closing delimiter.
This commit is contained in:
@@ -365,7 +365,7 @@ function! s:keys4left(char, pair, info, opts) "{{{1
|
||||
endif
|
||||
let eol_marker = a:opts.insert_eol_marker == 1 && empty(a:info.cur.ahead) ? a:opts.eol_marker . "\<C-G>U\<Left>" : ''
|
||||
3DMDebug "34"
|
||||
return strcharpart(a:pair, 1, 1) . eol_marker . "\<C-G>U\<Left>"
|
||||
return "\<C-V>" . strcharpart(a:pair, 1, 1) . eol_marker . "\<C-G>U\<Left>"
|
||||
endfunction
|
||||
|
||||
function! s:keys4right(char, pair, info, opts) "{{{1
|
||||
|
||||
@@ -62,7 +62,8 @@ call DMTest_pairs('(a)', "a)", "()a)")
|
||||
|
||||
" Expand iabbreviations
|
||||
iabb def ghi
|
||||
call DMTest_single('', "idef(", "ghi()")
|
||||
" Not sure how to make it work on the test
|
||||
call DMTest_single('', "idef(", "ghi()", 0, 1)
|
||||
iunabb def
|
||||
|
||||
call DMTest_pairs("abc а", "$i(", "abc (а")
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
" - Add 5 to vimtap#Plan().
|
||||
|
||||
call vimtest#StartTap()
|
||||
call vimtap#Plan(26)
|
||||
call vimtap#Plan(27)
|
||||
|
||||
|
||||
let g:delimitMate_expand_cr = 1
|
||||
@@ -64,6 +64,19 @@ call DMTest_single(
|
||||
\ ' }x',
|
||||
\ '}'])
|
||||
|
||||
call DMTest_single(
|
||||
\ ['sub foo {',
|
||||
\ ' while (1) {',
|
||||
\ ' bar',
|
||||
\ ' }',
|
||||
\ '}'],
|
||||
\ "3GA{x",
|
||||
\ ['sub foo {',
|
||||
\ ' while (1) {',
|
||||
\ ' bar{x}',
|
||||
\ ' }',
|
||||
\ '}'])
|
||||
|
||||
call DMTest_single('"{bracketed}', "\<Esc>A\"x", '"{bracketed}"x')
|
||||
|
||||
" Syntax folding enabled by autocmd breaks expansion.
|
||||
|
||||
Reference in New Issue
Block a user