Skip to content

Instantly share code, notes, and snippets.

@SuryaThiru
Last active March 28, 2023 08:50
Show Gist options
  • Save SuryaThiru/0a6d55832419abb448a8cc875c74b6d8 to your computer and use it in GitHub Desktop.
Save SuryaThiru/0a6d55832419abb448a8cc875c74b6d8 to your computer and use it in GitHub Desktop.
Simple compiler for vim to fill python traceback in the quickfix window. Copy the file to `.vim/compiler/python.vim`.
" https://vi.stackexchange.com/questions/5110/quickfix-support-for-python-tracebacks
if exists("current_compiler")
finish
endif
let current_compiler = "python"
let s:cpo_save = &cpo
set cpo&vim
CompilerSet errorformat=
\%*\\sFile\ \"%f\"\\,\ line\ %l\\,\ %m,
\%*\\sFile\ \"%f\"\\,\ line\ %l,
CompilerSet makeprg=python3\ %
let &cpo = s:cpo_save
unlet s:cpo_save
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment