Last active
December 15, 2015 04:29
-
-
Save fweep/5202251 to your computer and use it in GitHub Desktop.
Vim function to load .git/quickfix.out into the quickfix window.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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