diff --git a/autoload/delimitMate.vim b/autoload/delimitMate.vim index c7c0e08..eb7f914 100644 --- a/autoload/delimitMate.vim +++ b/autoload/delimitMate.vim @@ -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 "\" + endif +endfunction " }}} + function! delimitMate#Finish() " {{{ let len = len(b:delimitMate_buffer) if len > 0 @@ -424,6 +437,8 @@ function! delimitMate#ExtraMappings() "{{{ inoremap =delimitMate#FlushBuffer() inoremap =delimitMate#FlushBuffer() + inoremap =delimitMate#Del() + endfunction "}}} "}}}