Allow jumping over contiguous delimiters. Closes #44.

This commit is contained in:
Israel Chauca Fuentes
2010-12-08 03:34:45 -06:00
parent 589b2ae85a
commit 873e79ec37
2 changed files with 32 additions and 2 deletions

View File

@@ -171,7 +171,7 @@ function! s:Unmap() " {{{
\ b:_l_delimitMate_apostrophes_list +
\ ['<BS>', '<S-BS>', '<Del>', '<CR>', '<Space>', '<S-Tab>', '<Esc>'] +
\ ['<Up>', '<Down>', '<Left>', '<Right>', '<LeftMouse>', '<RightMouse>'] +
\ ['<Home>', '<End>', '<PageUp>', '<PageDown>', '<S-Down>', '<S-Up>']
\ ['<Home>', '<End>', '<PageUp>', '<PageDown>', '<S-Down>', '<S-Up>', '<C-G>g']
for map in imaps
if maparg(map, "i") =~? 'delimitMate'
@@ -353,6 +353,10 @@ function! s:ExtraMappings() "{{{
endif
endfor
" Jump over next delimiters
inoremap <buffer> <Plug>delimitMateJumpMany <C-R>=len(b:_l_delimitMate_buffer) ? delimitMate#Finish(0) : delimitMate#JumpMany()<CR>
imap <silent> <buffer> <C-G>g <Plug>delimitMateJumpMany
" Map away!
if !hasmapto('<Plug>delimitMateDel', 'i')
silent! imap <unique> <buffer> <Del> <Plug>delimitMateDel