尝试在 vim 中使用 ctags 时出现 cscope 错误

发布于 2024-11-29 09:14:53 字数 578 浏览 4 评论 0原文

我已经为我的项目生成了 ctags:

ctags -f /home/grae/tags --recurse --langmap=C++:.C.h.c.cpp.hpp.inl --languages=C++ --extra=+q --fields=+iaS --c++-kinds=+p --verbose framework/ modules/ /usr/include/

然后将标签添加到 .vimrc:

set tags+=/home/grae/tags

我还临时添加了以下内容(但现在已删除):

set csto=1

现在,当我尝试 Ctrl+] 或 g] 时,我收到错误:

cstag:未找到标签

我不应该使用 cscope 所以我不确定这是怎么发生的。我目前的想法是:

* cscope on by default
* something has overriden Ctrl+] and g]

有什么想法可以解决这个问题吗?

I have generated ctags for my projects:

ctags -f /home/grae/tags --recurse --langmap=C++:.C.h.c.cpp.hpp.inl --languages=C++ --extra=+q --fields=+iaS --c++-kinds=+p --verbose framework/ modules/ /usr/include/

I then added the tags to .vimrc:

set tags+=/home/grae/tags

I also temporarily added the following (but have now removed):

set csto=1

Now when I try Ctrl+] or g] I get the error:

cstag: tag not found

I shouldn't be using cscope so I'm not sure how this has happened. My current thoughts are:

* cscope on by default
* something has overriden Ctrl+] and g]

Any ideas how to solve this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一指流沙 2024-12-06 09:14:53

检查 :options 时找到答案,您需要使用以下方法关闭 cscope:

:set nocst

Found an answer when inspecting :options, you need to turn off cscope by using:

:set nocst
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文