mirror of
https://github.com/Raimondi/delimitMate.git
synced 2025-12-07 21:24:51 +08:00
Allow CR expansion for arbitrary line suffix.
This commit is contained in:
@@ -405,10 +405,9 @@ function! delimitMate#ExpandReturn() "{{{
|
|||||||
if delimitMate#WithinEmptyPair()
|
if delimitMate#WithinEmptyPair()
|
||||||
" Expand:
|
" Expand:
|
||||||
call delimitMate#FlushBuffer()
|
call delimitMate#FlushBuffer()
|
||||||
let char = delimitMate#GetCharFromCursor(0)
|
|
||||||
"return "\<Esc>a\<CR>x\<CR>\<Esc>k$\"_xa"
|
let b:delimitMate_lineSuffix = getline('.')[col('.')-1:]
|
||||||
"return "\<Esc>a\<CR>\<UP>\<Esc>o"
|
call feedkeys("\<Esc>l\"_Do \<CR>\<C-R>\<C-R>=b:delimitMate_lineSuffix\<CR>\<Esc>k$i\<Del>", 't')
|
||||||
call feedkeys("\<Esc>a\<Del>\<Esc>ox\<BS>\<CR>".char."\<Esc>kA", 't')
|
|
||||||
return ''
|
return ''
|
||||||
else
|
else
|
||||||
return "\<CR>"
|
return "\<CR>"
|
||||||
|
|||||||
Reference in New Issue
Block a user