Skip to content

Instantly share code, notes, and snippets.

@FGtatsuro
Created July 3, 2013 17:11
Show Gist options
  • Save FGtatsuro/5920599 to your computer and use it in GitHub Desktop.
Save FGtatsuro/5920599 to your computer and use it in GitHub Desktop.
errormaker.vimとQuickFixウインドウの自動開閉 ref: http://qiita.com/FGtatsuro/items/bc596674a5401259a249
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