Modify b:_l_delimitMate_matchpairs_list.

This commit is contained in:
Israel Chauca Fuentes
2012-02-07 22:32:17 -05:00
parent cc1acaba96
commit 581a3ebc17
2 changed files with 4 additions and 6 deletions

View File

@@ -48,7 +48,7 @@ endfunction "}}}
function! delimitMate#IsEmptyPair(str) "{{{
for pair in b:_l_delimitMate_matchpairs_list
if a:str == join( split( pair, ':' ),'' )
if a:str == join(pair,'')
return 1
endif
endfor
@@ -113,8 +113,6 @@ function! delimitMate#IsSpaceExpansion() " {{{
endfunction " }}} IsSpaceExpansion()
function! delimitMate#WithinEmptyPair() "{{{
let line = getline('.')
let col = col('.') - 1
" get char before the cursor.
let char1 = delimitMate#GetCharBeforeCursor()
" get char under the cursor.

View File

@@ -58,9 +58,9 @@ function! s:init() "{{{
" matchpairs
call s:option_init("matchpairs", string(&matchpairs)[1:-2])
call s:option_init("matchpairs_list", split(b:_l_delimitMate_matchpairs, ','))
call s:option_init("left_delims", split(b:_l_delimitMate_matchpairs, ':.,\='))
call s:option_init("right_delims", split(b:_l_delimitMate_matchpairs, ',\=.:'))
call s:option_init("matchpairs_list", map(split(b:_l_delimitMate_matchpairs, ','), 'split(v:val, '':'')'))
call s:option_init("left_delims", map(copy(b:_l_delimitMate_matchpairs_list), 'v:val[0]'))
call s:option_init("right_delims", map(copy(b:_l_delimitMate_matchpairs_list), 'v:val[1]'))
" quotes
call s:option_init("quotes", "\" ' `")