Fixes #8 having errors with the double quotes when cpoptions is $
This commit is contained in:
parent
a452553602
commit
8026a0db4b
@ -196,7 +196,8 @@ function! AutoPairsFastWrap()
|
||||
endfunction
|
||||
|
||||
function! AutoPairsMap(key)
|
||||
execute 'inoremap <buffer> <silent> '.a:key.' <C-R>=AutoPairsInsert("\'.a:key.'")<CR>'
|
||||
let escaped_key = substitute(a:key, "'", "''", 'g')
|
||||
execute 'inoremap <buffer> <silent> '.a:key." <C-R>=AutoPairsInsert('".escaped_key."')<CR>"
|
||||
endfunction
|
||||
|
||||
function! AutoPairsToggle()
|
||||
|
Loading…
Reference in New Issue
Block a user