Skip to content

Commit

Permalink
(fix) Delete empty delimiters on backspace
Browse files Browse the repository at this point in the history
  • Loading branch information
p-herbert committed Mar 12, 2018
1 parent af647eb commit 2503739
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .vimrc
Expand Up @@ -103,6 +103,9 @@ nmap <leader>h :vsp \| :Glog -- % <CR><CR> \| :copen<CR>
" Map HighlightRepeats function
vn <leader>R :call HighlightRepeats()<CR>
" Patch for delimitMate
imap <silent> <BS> <C-R>=YcmOnDeleteChar()<CR><Plug>delimitMateBS
" Function keys
:nnoremap <F5> :set hlsearch!<CR>
call togglebg#map("<F6>") " load the background script
Expand Down Expand Up @@ -314,3 +317,11 @@ function! SyntasticCheckHook(errors)
endif
endfunction

" Patch for delimitMate
function! YcmOnDeleteChar()
if pumvisible()
return "\<C-y>"
endif
return ""
endfunction

0 comments on commit 2503739

Please sign in to comment.