mirror of
https://github.com/jiangmiao/auto-pairs.git
synced 2025-04-22 04:41:00 +08:00
Merge 79ce87888451e93a5e2b853be3724c59b479c281 into 39f06b873a8449af8ff6a3eee716d3da14d63a76
This commit is contained in:
commit
4bf8ad3db1
@ -241,6 +241,13 @@ Options
|
||||
|
||||
Work with FlyMode, insert the key at the Fly Mode jumped postion
|
||||
|
||||
* g:AutoPairsIgnoreCharacters
|
||||
|
||||
Default : ['\']
|
||||
|
||||
Sets the characters to stop auto closing. For example, when set to
|
||||
['\', '#'], the plugin will not automatically close `#'`
|
||||
|
||||
* g:AutoPairsMoveCharacter
|
||||
|
||||
Default: "()[]{}\"'"
|
||||
|
@ -100,6 +100,10 @@ if !exists('g:AutoPairsSmartQuotes')
|
||||
let g:AutoPairsSmartQuotes = 1
|
||||
endif
|
||||
|
||||
if !exists('g:AutoPairsIgnoreCharacters')
|
||||
let g:AutoPairsIgnoreCharacters = ['\']
|
||||
endif
|
||||
|
||||
" 7.4.849 support <C-G>U to avoid breaking '.'
|
||||
" Issue talk: https://github.com/jiangmiao/auto-pairs/issues/3
|
||||
" Vim note: https://github.com/vim/vim/releases/tag/v7.4.849
|
||||
@ -204,8 +208,8 @@ func! AutoPairsInsert(key)
|
||||
|
||||
let [before, after, afterline] = s:getline()
|
||||
|
||||
" Ignore auto close if prev character is \
|
||||
if before[-1:-1] == '\'
|
||||
" Ignore auto close if prev character is in g:AutoPairsIgnoreCharacters
|
||||
if index(g:AutoPairsIgnoreCharacters, prev_char) != -1
|
||||
return a:key
|
||||
end
|
||||
|
||||
@ -332,7 +336,6 @@ func! AutoPairsDelete()
|
||||
return "\<BS>"
|
||||
endf
|
||||
|
||||
|
||||
" Fast wrap the word in brackets
|
||||
func! AutoPairsFastWrap()
|
||||
let c = @"
|
||||
|
Loading…
x
Reference in New Issue
Block a user