Consider more characters in smart_matchpairs default value.

This commit is contained in:
Israel Chauca Fuentes
2015-05-17 19:34:11 -04:00
parent 9a77c3aee6
commit 5945fdfd14
2 changed files with 13 additions and 3 deletions

View File

@@ -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 <silent> <Plug>delimitMateBS <C-R>=delimitMate#BS()<CR>
if !hasmapto('<Plug>delimitMateBS','i')
if maparg('<BS>', 'i') == ''
if empty(maparg('<BS>', 'i'))
silent! imap <unique> <buffer> <BS> <Plug>delimitMateBS
endif
if maparg('<C-h>', 'i') == ''
if empty(maparg('<C-H>', 'i'))
silent! imap <unique> <buffer> <C-h> <Plug>delimitMateBS
endif
endif

View File

@@ -39,3 +39,13 @@ let b:delimitMate_eol_marker = ';'
unlet b:delimitMate_eol_marker
iabb def ghi
"def(" "ghi()"
iunabb def
"abc а\<Left>(" "abc (а"
"abc ñ\<Left>(" "abc (ñ"
"abc $\<Left>(" "abc ($"
"abc £\<Left>(" "abc (£"
"abc d\<Left>(" "abc (d"
"abc \<C-V>(\<Left>(" "abc (("
"abc .\<Left>(" "abc ()."
"abc \<Left>(" "abc () "