mirror of
https://github.com/jiangmiao/auto-pairs.git
synced 2025-04-21 20:18:48 +08:00
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…
x
Reference in New Issue
Block a user