" Stolen from Steve Losh vimrc: https://bitbucket.org/sjl/dotfiles/src/tip/vim/.vimrc " Open a Quickfix window for the last search. nnoremap q/ :execute 'vimgrep /'.@/.'/g %':copen " Ag for the last search. nnoremap qa/ :execute "Ag! '" . substitute(substitute(substitute(@/, "\\\\<", "\\\\b", ""), "\\\\>", "\\\\b", ""), "\\\\v", "", "") . "'"