Add smart_matchpairs

This option will prevent delimitMate from inserting the closing
delimiter when there is a keyword character on the right of the cursor.
This commit is contained in:
Israel Chauca Fuentes
2010-11-06 20:05:40 -05:00
parent 5bf6a1e30c
commit 12c5c96ca2
2 changed files with 7 additions and 1 deletions

View File

@@ -258,7 +258,10 @@ function! delimitMate#ParenDelim(char) " {{{
endif
let line = getline('.')
let col = col('.')-2
if (col) < 0
if b:_l_delimitMate_smart_matchpairs &&
\ line[col+1] =~ '\S'
return ''
elseif (col) < 0
call setline('.',a:char.line)
call insert(b:_l_delimitMate_buffer, a:char)
else