mirror of
https://github.com/Raimondi/delimitMate.git
synced 2025-12-06 12:44:27 +08:00
Modify b:_l_delimitMate_matchpairs_list.
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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", "\" ' `")
|
||||
|
||||
Reference in New Issue
Block a user