Last active
March 28, 2023 08:50
-
-
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`.
This file contains 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
" 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