Skip to content

Instantly share code, notes, and snippets.

@dahu
Created March 23, 2014 01:28
Show Gist options
  • Save dahu/9717174 to your computer and use it in GitHub Desktop.
Save dahu/9717174 to your computer and use it in GitHub Desktop.
clean up search history after substitution
function! Ronin()
substitute/\%V"/'&'/g
nohl
call histdel("search", -1)
endfunction
vnoremap <leader>q :<c-u>call Ronin()<cr>
@dahu
Copy link
Author

dahu commented Mar 23, 2014

of course, there's no reason why you need a function for this.

:vnoremap q :s/%V"/'&'/gnohcall histdel("search", -1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment