Fixed <Del> re-do-wise.

This commit is contained in:
Israel Chauca Fuentes
2010-05-03 03:21:31 -05:00
parent a751498fbc
commit 5ca0eee4cd

View File

@@ -300,6 +300,19 @@ function! delimitMate#BS() " {{{
endif
endfunction " }}} delimitMate#BS()
function! delimitMate#Del() " {{{
if len(b:delimitMate_buffer) > 0
let line = getline('.')
let col = col('.') - 2
call delimitMate#RmBuffer(1)
echom line[:col-1] . "|" . line[col+1:]
call setline('.', line[:col] . line[col+2:])
return ''
else
return "\<Del>"
endif
endfunction " }}}
function! delimitMate#Finish() " {{{
let len = len(b:delimitMate_buffer)
if len > 0
@@ -424,6 +437,8 @@ function! delimitMate#ExtraMappings() "{{{
inoremap <buffer> <Up> <C-R>=delimitMate#FlushBuffer()<CR><Up>
inoremap <buffer> <Down> <C-R>=delimitMate#FlushBuffer()<CR><Down>
inoremap <buffer> <Del> <C-R>=delimitMate#Del()<CR>
endfunction "}}}
"}}}