Allow CR expansion for arbitrary line suffix.

This commit is contained in:
Akos Gyimesi
2012-02-23 21:35:40 +01:00
parent 2af2dd2350
commit 1cbbe90a09

View File

@@ -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>"