问题描述
有人使用 cscope
和Python代码成功管理了吗?我已经安装了VIM 7.2,并安装了最新版本的 cscope
,但是它无法正确获取我的代码标记(始终会出现几行)。我尝试了 pycscope
脚本,但现代版本的 cscope
不支持其输出。
Has anyone managed successfully using cscope
with Python code? I have VIM 7.2 and the latest version of cscope
installed, however it doesn't get my code's tags correctly (always off by a couple of lines). I tried the pycscope
script but its output isn't supported by the modern version of cscope
.
有什么想法吗?还是使用VIM浏览Python代码的替代方法? (除了 ctags
的简单标记之外,我对 cscope
所提供的其他功能特别感兴趣)
Any ideas? Or an alternative for browsing Python code with VIM? (I'm specifically interested in the extra features cscope
offers beyond the simple tags of ctags
)
推荐答案
- 从与
cscope
的维护者的对应中,这该工具并非旨在与Python配合使用,也没有实现该兼容性的计划。不管现在如何工作,显然都是错误的,并且无法保证它将继续工作。 - 看来我一直在使用<$ c的过时版本$ c> pycscope 。
cscope
数据库支持最新版本0.3。pycscope
的作者告诉我,他通过阅读<cscope
DB的源格式,得出了输出格式。 code> cscope 。该格式不是有意记录的,但是尽管如此,它目前仍可用于pycsope
0.3,这是我将要使用的解决方案。
- From a correspondence with the maintainer of
cscope
, this tool isn't designed to work with Python, and there are no plans to implement that compatibility. Whatever works now, apparently works by mistake, and there is no promise whatsoever that it will keep working. - It appears I've been using an out-of-date version of
pycscope
. The latest version 0.3 is supported by thecscope
DB. The author ofpycscope
told me that he figured out the output format for thecscope
DB from reading the source code ofcscope
. That format isn't documented, on purpose, but nevertheless it currently works withpycsope
0.3, which is the solution I'll be using.
我将接受此答案,因为不幸的是,即使宣布了赏金,也没有其他答案可以提供帮助。没有答案被赞成,所以老实说,我不知道赏金会去哪里。
I'm going to accept this answer since unfortunately no other answer provided help even after bounty was declared. No answers are upvoted, so I honestly have no idea where the bounty will go.
这篇关于使用cscope通过VIM浏览Python代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!