From 2503739a7b8bf82cf0b879131ebbaf75b1df9990 Mon Sep 17 00:00:00 2001 From: p-herbert Date: Mon, 12 Mar 2018 15:20:57 -0700 Subject: [PATCH] (fix) Delete empty delimiters on backspace See issues 1. https://github.com/Valloric/YouCompleteMe/issues/2696 2. https://github.com/Raimondi/delimitMate/issues/269 --- .vimrc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.vimrc b/.vimrc index 614f012..5b04a98 100644 --- a/.vimrc +++ b/.vimrc @@ -103,6 +103,9 @@ nmap h :vsp \| :Glog -- % \| :copen " Map HighlightRepeats function vn R :call HighlightRepeats() +" Patch for delimitMate +imap =YcmOnDeleteChar()delimitMateBS + " Function keys :nnoremap :set hlsearch! call togglebg#map("") " load the background script @@ -314,3 +317,11 @@ function! SyntasticCheckHook(errors) endif endfunction +" Patch for delimitMate +function! YcmOnDeleteChar() + if pumvisible() + return "\" + endif + return "" +endfunction +