Created
March 23, 2014 01:28
-
-
Save dahu/9717174 to your computer and use it in GitHub Desktop.
clean up search history after substitution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! Ronin() | |
substitute/\%V"/'&'/g | |
nohl | |
call histdel("search", -1) | |
endfunction | |
vnoremap <leader>q :<c-u>call Ronin()<cr> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
of course, there's no reason why you need a function for this.
:vnoremap q :s/%V"/'&'/gnohcall histdel("search", -1)