diff --git a/plugin/delimitMate.vim b/plugin/delimitMate.vim index 6ae8aa0..8d64d30 100644 --- a/plugin/delimitMate.vim +++ b/plugin/delimitMate.vim @@ -107,7 +107,7 @@ function! s:init() "{{{ " jump_expansion call s:option_init("jump_expansion", 0) " smart_matchpairs - call s:option_init("smart_matchpairs", '^\%(\w\|\!\|£\|\$\|_\)') + call s:option_init("smart_matchpairs", '^\%(\w\|\!\|[£$]\|[^[:punct:][:space:]]\)') " smart_quotes " XXX: backward compatibility. Ugly, should go the way of the dodo soon. let quotes = escape(join(s:get('quotes_list'), ''), '\-^[]') @@ -326,10 +326,10 @@ function! s:ExtraMappings() "{{{ " If pair is empty, delete both delimiters: inoremap delimitMateBS =delimitMate#BS() if !hasmapto('delimitMateBS','i') - if maparg('', 'i') == '' + if empty(maparg('', 'i')) silent! imap delimitMateBS endif - if maparg('', 'i') == '' + if empty(maparg('', 'i')) silent! imap delimitMateBS endif endif diff --git a/test/autoclose_matchpairs.txt b/test/autoclose_matchpairs.txt index 809c44f..df5f61b 100644 --- a/test/autoclose_matchpairs.txt +++ b/test/autoclose_matchpairs.txt @@ -39,3 +39,13 @@ let b:delimitMate_eol_marker = ';' unlet b:delimitMate_eol_marker iabb def ghi "def(" "ghi()" +iunabb def + +"abc а\(" "abc (а" +"abc ñ\(" "abc (ñ" +"abc $\(" "abc ($" +"abc £\(" "abc (£" +"abc d\(" "abc (d" +"abc \(\(" "abc ((" +"abc .\(" "abc ()." +"abc \(" "abc () "