Skip to content

Instantly share code, notes, and snippets.

@fweep
Last active December 15, 2015 04:29
Show Gist options
  • Save fweep/5202251 to your computer and use it in GitHub Desktop.
Save fweep/5202251 to your computer and use it in GitHub Desktop.
Vim function to load .git/quickfix.out into the quickfix window.
function! LoadAndDisplayRSpecQuickfix()
let quickfix_filename = ".git/quickfix.out"
if filereadable(quickfix_filename) && getfsize(quickfix_filename) != 0
silent execute ":cfile " . quickfix_filename
botright cwindow
cc
else
redraw!
echohl WarningMsg | echo "Quickfix file " . quickfix_filename . " is missing or empty." | echohl None
endif
endfunction
noremap <Leader>q :call LoadAndDisplayRSpecQuickfix()<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment