Update auto-pairs.vim

This commit is contained in:
Léopold Mebazaa 2019-10-11 12:51:49 -04:00 committed by GitHub
parent 39f06b873a
commit 5f254b3c31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,9 +21,12 @@ func! AutoPairsDefaultPairs()
if exists('b:autopairs_defaultpairs')
return b:autopairs_defaultpairs
end
" Added a more complex regex to capture in-line VimL comments
let no_quotes = '(\\\"|[^"])*'
let com_inl = '|^("'.no_quotes.'"*|[^"])* \zs"\ze'.no_quotes.'$'
let r = copy(g:AutoPairs)
let allPairs = {
\ 'vim': {'\v^\s*\zs"': ''},
\ 'vim': {'\v^\s*\zs"'.com_inl: ''},
\ 'rust': {'\w\zs<': '>', '&\zs''': ''},
\ 'php': {'<?': '?>//k]', '<?php': '?>//k]'}
\ }