fixes issue #9 Lowercase 'a' acute accent via opt-e not working
REMOVE g:AutoPairsShortcuts ADD g:AutoPairsShortcutJump
This commit is contained in:
parent
8026a0db4b
commit
48232b5e3d
24
README.md
24
README.md
@ -84,14 +84,15 @@ Shortcuts
|
||||
System Shortcuts:
|
||||
<CR> : Insert new indented line after return if cursor in blank brackets or quotes.
|
||||
<BS> : Delete brackets in pair
|
||||
<M-p> : Toggle Autopairs
|
||||
<M-e> : Fast Wrap
|
||||
<M-p> : Toggle Autopairs (g:AutoPairsShortcutToggle)
|
||||
<M-e> : Fast Wrap (g:AutoPairsShortcutFastWrap)
|
||||
<M-n> : Jump to next closed pair (g:AutoPairsShortcutJump)
|
||||
|
||||
Optional Shortcuts:
|
||||
could be turn off by let g:AutoPairsShortcuts = 0
|
||||
<M-n> jump to next closed bracket.
|
||||
<M-a> jump to end of line.
|
||||
<M-o> jump to newline with indented.
|
||||
If <M-p> <M-e> or <M-n> conflict with another keys or want to bind to another keys, add
|
||||
|
||||
let g:AutoPairscutToggle = '<another key>'
|
||||
|
||||
to .vimrc, it the key is empty string '', then the shortcut will be disabled.
|
||||
|
||||
Options
|
||||
-------
|
||||
@ -113,14 +114,11 @@ Options
|
||||
(|)'hello' after fast wrap at |, the word will be ('hello')
|
||||
(|)<hello> after fast wrap at |, the word will be (<hello>)
|
||||
|
||||
* g:AutoPairsShortcuts
|
||||
* g:AutoPairsShortcutJump
|
||||
|
||||
Default: 1
|
||||
Default: '<M-n>'
|
||||
|
||||
imap 3 shortcuts
|
||||
<M-n> jump to next closed bracket.
|
||||
<M-a> jump to end of line.
|
||||
<M-o> jump to newline with indented.
|
||||
Jump to the next closed pair
|
||||
|
||||
* g:AutoPairsMapBS
|
||||
|
||||
|
@ -54,6 +54,10 @@ if !exists('g:AutoPairsShortcutFastWrap')
|
||||
let g:AutoPairsShortcutFastWrap = '<M-e>'
|
||||
end
|
||||
|
||||
if !exists('g:AutoPairsShortcutJump')
|
||||
let g:AutoPairsShortcutJump = '<M-n>'
|
||||
endif
|
||||
|
||||
let g:AutoPairsClosedPairs = {}
|
||||
|
||||
|
||||
@ -162,7 +166,7 @@ function! AutoPairsDelete()
|
||||
endfunction
|
||||
|
||||
function! AutoPairsJump()
|
||||
call search('[{("\[\]'')}]','W')
|
||||
call search('["\]'')}]','W')
|
||||
endfunction
|
||||
|
||||
" Fast wrap the word in brackets
|
||||
@ -266,16 +270,21 @@ function! AutoPairsInit()
|
||||
execute 'inoremap <buffer> <silent> <expr> <SPACE> AutoPairsSpace()'
|
||||
end
|
||||
|
||||
if g:AutoPairsShortcutFastWrap != ''
|
||||
execute 'inoremap <buffer> <silent> '.g:AutoPairsShortcutFastWrap.' <C-R>=AutoPairsFastWrap()<CR>'
|
||||
end
|
||||
|
||||
if g:AutoPairsShortcutToggle != ''
|
||||
" use <expr> to ensure showing the status when toggle
|
||||
execute 'inoremap <buffer> <silent> <expr> '.g:AutoPairsShortcutToggle.' AutoPairsToggle()'
|
||||
execute 'noremap <buffer> <silent> '.g:AutoPairsShortcutToggle.' :call AutoPairsToggle()<CR>'
|
||||
" If the keys map conflict with your own settings, delete or change them
|
||||
if g:AutoPairsShortcuts
|
||||
execute 'inoremap <buffer> <silent> <M-n> <ESC>:call AutoPairsJump()<CR>a'
|
||||
execute 'inoremap <buffer> <silent> <M-a> <END>'
|
||||
execute 'inoremap <buffer> <silent> <M-o> <END><CR>'
|
||||
end
|
||||
|
||||
if g:AutoPairsShortcutJump != ''
|
||||
execute 'inoremap <buffer> <silent> ' . g:AutoPairsShortcutJump. ' <ESC>:call AutoPairsJump()<CR>a'
|
||||
execute 'noremap <buffer> <silent> ' . g:AutoPairsShortcutJump. ' :call AutoPairsJump()<CR>'
|
||||
end
|
||||
|
||||
endfunction
|
||||
|
||||
function! AutoPairsForceInit()
|
||||
|
Loading…
x
Reference in New Issue
Block a user