mirror of
https://github.com/Raimondi/delimitMate.git
synced 2026-05-17 05:49:52 +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
|
endif
|
||||||
let eol_marker = a:opts.insert_eol_marker == 1 && empty(a:info.cur.ahead) ? a:opts.eol_marker . "\<C-G>U\<Left>" : ''
|
let eol_marker = a:opts.insert_eol_marker == 1 && empty(a:info.cur.ahead) ? a:opts.eol_marker . "\<C-G>U\<Left>" : ''
|
||||||
3DMDebug "34"
|
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
|
endfunction
|
||||||
|
|
||||||
function! s:keys4right(char, pair, info, opts) "{{{1
|
function! s:keys4right(char, pair, info, opts) "{{{1
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ call DMTest_pairs('(a)', "a)", "()a)")
|
|||||||
|
|
||||||
" Expand iabbreviations
|
" Expand iabbreviations
|
||||||
iabb def ghi
|
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
|
iunabb def
|
||||||
|
|
||||||
call DMTest_pairs("abc а", "$i(", "abc (а")
|
call DMTest_pairs("abc а", "$i(", "abc (а")
|
||||||
|
|||||||
+14
-1
@@ -11,7 +11,7 @@
|
|||||||
" - Add 5 to vimtap#Plan().
|
" - Add 5 to vimtap#Plan().
|
||||||
|
|
||||||
call vimtest#StartTap()
|
call vimtest#StartTap()
|
||||||
call vimtap#Plan(26)
|
call vimtap#Plan(27)
|
||||||
|
|
||||||
|
|
||||||
let g:delimitMate_expand_cr = 1
|
let g:delimitMate_expand_cr = 1
|
||||||
@@ -64,6 +64,19 @@ call DMTest_single(
|
|||||||
\ ' }x',
|
\ ' }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')
|
call DMTest_single('"{bracketed}', "\<Esc>A\"x", '"{bracketed}"x')
|
||||||
|
|
||||||
" Syntax folding enabled by autocmd breaks expansion.
|
" Syntax folding enabled by autocmd breaks expansion.
|
||||||
|
|||||||
Reference in New Issue
Block a user