mirror of
https://github.com/Raimondi/delimitMate.git
synced 2026-05-11 09:08:36 +08:00
Fixed <Del> re-do-wise.
This commit is contained in:
@@ -300,6 +300,19 @@ function! delimitMate#BS() " {{{
|
|||||||
endif
|
endif
|
||||||
endfunction " }}} delimitMate#BS()
|
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() " {{{
|
function! delimitMate#Finish() " {{{
|
||||||
let len = len(b:delimitMate_buffer)
|
let len = len(b:delimitMate_buffer)
|
||||||
if len > 0
|
if len > 0
|
||||||
@@ -424,6 +437,8 @@ function! delimitMate#ExtraMappings() "{{{
|
|||||||
inoremap <buffer> <Up> <C-R>=delimitMate#FlushBuffer()<CR><Up>
|
inoremap <buffer> <Up> <C-R>=delimitMate#FlushBuffer()<CR><Up>
|
||||||
inoremap <buffer> <Down> <C-R>=delimitMate#FlushBuffer()<CR><Down>
|
inoremap <buffer> <Down> <C-R>=delimitMate#FlushBuffer()<CR><Down>
|
||||||
|
|
||||||
|
inoremap <buffer> <Del> <C-R>=delimitMate#Del()<CR>
|
||||||
|
|
||||||
endfunction "}}}
|
endfunction "}}}
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user