Skip to content

Instantly share code, notes, and snippets.

@naokirin
Last active August 29, 2015 14:16
Show Gist options
  • Save naokirin/71a77e9770458a04b88f to your computer and use it in GitHub Desktop.
Save naokirin/71a77e9770458a04b88f to your computer and use it in GitHub Desktop.
fugitive (git grep) + unite-quickfix
NeoBundle "osyo-manga/unite-quickfix.git"
" ------ unite-quickfix ------
command UniteQuickFix Unite -no-quit -vertical -winwidth=40 -max-multi-lines=1 quickfix
function! s:open_quickfix_with_ggrep(...)
let _ = join(a:000, " ")
execute ":Ggrep "._ | redraw!
if (len(getqflist()) > 0)
execute ":UniteQuickFix"
endif
endfunction
command! -nargs=+ Gg :call s:open_quickfix_with_ggrep(<f-args>)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment