mirror of
https://github.com/Raimondi/delimitMate.git
synced 2025-12-06 12:44:27 +08:00
Add C-h synonym for delimitMateBS (can't add one for S-BS though)
This commit is contained in:
@@ -178,7 +178,7 @@ function! s:Unmap() " {{{
|
||||
\ s:g('left_delims') +
|
||||
\ s:g('quotes_list') +
|
||||
\ s:g('apostrophes_list') +
|
||||
\ ['<BS>', '<S-BS>', '<Del>', '<CR>', '<Space>', '<S-Tab>', '<Esc>'] +
|
||||
\ ['<BS>', '<C-h>', '<S-BS>', '<Del>', '<CR>', '<Space>', '<S-Tab>', '<Esc>'] +
|
||||
\ ['<Up>', '<Down>', '<Left>', '<Right>', '<LeftMouse>', '<RightMouse>'] +
|
||||
\ ['<C-Left>', '<C-Right>'] +
|
||||
\ ['<Home>', '<End>', '<PageUp>', '<PageDown>', '<S-Down>', '<S-Up>', '<C-G>g']
|
||||
@@ -305,8 +305,13 @@ endfunction "}}}
|
||||
function! s:ExtraMappings() "{{{
|
||||
" If pair is empty, delete both delimiters:
|
||||
inoremap <silent> <Plug>delimitMateBS <C-R>=delimitMate#BS()<CR>
|
||||
if !hasmapto('<Plug>delimitMateBS','i') && maparg('<BS>'. 'i') == ''
|
||||
if !hasmapto('<Plug>delimitMateBS','i')
|
||||
if maparg('<BS>'. 'i') == ''
|
||||
silent! imap <unique> <buffer> <BS> <Plug>delimitMateBS
|
||||
endif
|
||||
if maparg('<C-h>'. 'i') == ''
|
||||
silent! imap <unique> <buffer> <C-h> <Plug>delimitMateBS
|
||||
endif
|
||||
endif
|
||||
" If pair is empty, delete closing delimiter:
|
||||
inoremap <silent> <expr> <Plug>delimitMateS-BS delimitMate#WithinEmptyPair() ? "\<Del>" : "\<S-BS>"
|
||||
|
||||
Reference in New Issue
Block a user