Created
July 3, 2013 17:11
-
-
Save FGtatsuro/5920599 to your computer and use it in GitHub Desktop.
errormaker.vimとQuickFixウインドウの自動開閉 ref: http://qiita.com/FGtatsuro/items/bc596674a5401259a249
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
setlocal makeprg=/Users/tatsuro/python/pythonbrew/bin/flake8\ % | |
setlocal errorformat=%f:%l:%m | |
""" getqflist()でQuickFixのエラー件数が取得できる. | |
function! s:open_quickfix_window() | |
silent make | redraw! | |
if (len(getqflist()) == 0) | |
cclose | |
else | |
copen | |
endif | |
endfunction | |
if !exists("g:python_flyquickfixmake") | |
let g:python_flyquickfixmake = 1 | |
au BufWritePost *.py call s:open_quickfix_window() | |
endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment