,q/ ,qg/ ,qa/ Quickfix search aliases inspired by Steve Losh
This commit is contained in:
9
vim/plugin/settings/quickfix-search.vim
Normal file
9
vim/plugin/settings/quickfix-search.vim
Normal file
@@ -0,0 +1,9 @@
|
||||
" Stolen from Steve Losh vimrc: https://bitbucket.org/sjl/dotfiles/src/tip/vim/.vimrc
|
||||
" Open a Quickfix window for the last search.
|
||||
nnoremap <silent> <leader>q/ :execute 'vimgrep /'.@/.'/g %'<CR>:copen<CR>
|
||||
|
||||
" Ack for the last search.
|
||||
nnoremap <silent> <leader>qa/ :execute "Ack! '" . substitute(substitute(substitute(@/, "\\\\<", "\\\\b", ""), "\\\\>", "\\\\b", ""), "\\\\v", "", "") . "'"<CR>
|
||||
|
||||
" GitGrep the last search (my own invention)
|
||||
nnoremap <silent> <leader>qg/ :execute "GitGrep '" . substitute(substitute(substitute(@/, "\\\\<", "\\\\b", ""), "\\\\>", "\\\\b", ""), "\\\\v", "", "") . "'"<CR>
|
||||
Reference in New Issue
Block a user