diff --git a/autoload/delimitMate.vim b/autoload/delimitMate.vim index 2c07934..9d18d4f 100644 --- a/autoload/delimitMate.vim +++ b/autoload/delimitMate.vim @@ -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. diff --git a/plugin/delimitMate.vim b/plugin/delimitMate.vim index b48c813..7cdee6a 100644 --- a/plugin/delimitMate.vim +++ b/plugin/delimitMate.vim @@ -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", "\" ' `")