Fix conflict with cindent. Comment on #95.

This commit is contained in:
Israel Chauca Fuentes
2012-04-01 17:59:40 -04:00
parent 93d4a373fb
commit ad4430706e
2 changed files with 13 additions and 2 deletions

View File

@@ -354,8 +354,7 @@ function! delimitMate#JumpOut(char) "{{{
return ' '.a:char.delimitMate#Del().delimitMate#Del() return ' '.a:char.delimitMate#Del().delimitMate#Del()
elseif jump == 5 elseif jump == 5
call delimitMate#FlushBuffer() call delimitMate#FlushBuffer()
return "\<CR>" . matchstr(getline(line('.') + 1), '^\s*\S') return "\<C-O>:exec \"normal! \\<CR>a\"\<CR>"
\ . delimitMate#Del() . "\<Del>"
else else
return a:char return a:char
endif endif

View File

@@ -30,3 +30,15 @@ exec "normal i( \<CR>\<BS>\<BS>x"
================================================================================ ================================================================================
(x) (x)
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
# Conflict with indentation settings (cindent). Issue #95
se cindent
call setline(1, ['sub foo {',' while (1) {', ' ', ' }', '}'])
call cursor(3, 8)
normal a}x
================================================================================
sub foo {
while (1) {
}x
}
--------------------------------------------------------------------------------