mirror of
https://github.com/Raimondi/delimitMate.git
synced 2025-12-08 13:44:47 +08:00
Fix: automatic indent was broken when expanding <CR>.
This commit is contained in:
@@ -442,19 +442,18 @@ function! delimitMate#MapMsg(msg) "{{{
|
|||||||
endfunction "}}}
|
endfunction "}}}
|
||||||
|
|
||||||
function! delimitMate#ExpandReturn() "{{{
|
function! delimitMate#ExpandReturn() "{{{
|
||||||
if delimitMate#WithinEmptyPair() &&
|
if delimitMate#WithinEmptyPair()
|
||||||
\ b:delimitMate_expand_cr
|
|
||||||
" Expand:
|
" Expand:
|
||||||
call delimitMate#FlushBuffer()
|
call delimitMate#FlushBuffer()
|
||||||
return "\<Esc>a\<CR>x\<CR>\<Esc>k$\"_xa"
|
"return "\<Esc>a\<CR>x\<CR>\<Esc>k$\"_xa"
|
||||||
|
return "\<CR>\<UP>\<Esc>o"
|
||||||
else
|
else
|
||||||
return "\<CR>"
|
return "\<CR>"
|
||||||
endif
|
endif
|
||||||
endfunction "}}}
|
endfunction "}}}
|
||||||
|
|
||||||
function! delimitMate#ExpandSpace() "{{{
|
function! delimitMate#ExpandSpace() "{{{
|
||||||
if delimitMate#WithinEmptyPair() &&
|
if delimitMate#WithinEmptyPair()
|
||||||
\ b:delimitMate_expand_space
|
|
||||||
" Expand:
|
" Expand:
|
||||||
call insert(b:delimitMate_buffer, 's')
|
call insert(b:delimitMate_buffer, 's')
|
||||||
return delimitMate#WriteAfter(' ') . "\<Space>"
|
return delimitMate#WriteAfter(' ') . "\<Space>"
|
||||||
|
|||||||
Reference in New Issue
Block a user