2013-01-15 50 views
0

我正在尝试使用quickfix来追踪Python错误。通过makeprg运行的Python后,:copen窗口包含类似以下内容:我可以做:cn在vim中使用路径吗?

./test_semismooth.py|110| in <module> 
./test_semismooth.py|57| in test_semismooth 
/Users/irving/otherlab/other/sim/SemismoothStatic.py|82| in update AttributeError: 'SolverProps' object has no attribute 'solver_props' 

如果我跟踪来回:cn/:cp抛出错误,绝对的文件名工作正常,但它未能找到test_semismooth.py,即使它是在path,它看起来像

path=,.,~/physbam,~/otherlab/otherfab,~/duck,~/pentago,~/otherlab/other/sim,~/otherlab/other 

具体而言,test_semismooth.py是在~/otherlab/other/sim(当前目录是~/otherlab/other)。

为什么不使用路径quickfix?有没有办法来解决这个问题?

回答

0

我不知道如何使用路径,但更改errorformat以了解脚本的工作目录解决了问题。具体来说,

  1. 打印Entering directory '$dir'cd“荷兰国际集团到脚本目录。
  2. %DEntering directory '%f'加到我的errorformat定义中.vimrc
相关问题