mirror of
https://github.com/Raimondi/delimitMate.git
synced 2025-12-06 12:44:27 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user