mirror of
https://github.com/jiangmiao/auto-pairs.git
synced 2025-04-21 20:18:48 +08:00
Merge 648034ccb851782d12f0e57c7cfae1f3427185ec into 39f06b873a8449af8ff6a3eee716d3da14d63a76
This commit is contained in:
commit
6dea3d54ba
@ -334,7 +334,7 @@ endf
|
||||
|
||||
|
||||
" Fast wrap the word in brackets
|
||||
func! AutoPairsFastWrap()
|
||||
func! AutoPairsFastWrap(movement)
|
||||
let c = @"
|
||||
normal! x
|
||||
let [before, after, ig] = s:getline()
|
||||
@ -354,7 +354,7 @@ func! AutoPairsFastWrap()
|
||||
end
|
||||
endfor
|
||||
if after[1:1] =~ '\v\w'
|
||||
normal! e
|
||||
execute "normal! ".a:movement
|
||||
normal! p
|
||||
else
|
||||
normal! p
|
||||
@ -559,7 +559,7 @@ func! AutoPairsInit()
|
||||
end
|
||||
|
||||
if g:AutoPairsShortcutFastWrap != ''
|
||||
execute 'inoremap <buffer> <silent> '.g:AutoPairsShortcutFastWrap.' <C-R>=AutoPairsFastWrap()<CR>'
|
||||
execute 'inoremap <buffer> <silent> '.g:AutoPairsShortcutFastWrap.' <C-R>=AutoPairsFastWrap("e")<CR>'
|
||||
end
|
||||
|
||||
if g:AutoPairsShortcutBackInsert != ''
|
||||
|
Loading…
x
Reference in New Issue
Block a user