是否有任何实用程序或插件为 C++ 提供类似 cscope 的功能。我在寻找
- 所有对符号的引用
- 全局定义
- 函数调用的函数
- 函数调用函数
- 文件包括文件
线程中列出了一些工具,https ://www.reddit.com/r/emacs/comments/1qktcb/cscope_like_functionality_that_correctly_handles/ :
clang-tag find-def
) / go to usage ( clang-tag grep
)。vim-clang-tags可用于列出所有用法(:ClangTagsGrep
命令);也有emacs插件./bin/rdm
守护进程) - 具有“跟随符号”和“查找参考”。与 emacs 集成 - "rtags.el"
; Vim 有两个项目:https ://github.com/lyuts/vim-rtags (对 rtags 的丰富支持)和https://github.com/shaneharper/vim-rtags(只有 2 个命令)都带有“查找参考” " 和 "查找定义" 函数其他一些链接
还有一些快速(索引)的 grep,比如 Russ Cox 的代码搜索工具(它也适用于正则表达式 - https://github.com/google/codesearch;示例是https://codesearch.debian.net/about)或任何其他索引的 grep...
还有交叉引用工具(GUI 和网络服务器),如 LXR 和其他... https://github.com/oracle/opengrok/wiki/Comparison-with-Similar-Tools
Vim 可以直接与开箱即用的 cscope 交互。键入:h cscope
。这需要在编译 Vim 时启用 cscope 功能并在您的计算机上安装 cscope。
cscope 网页上有一个Vim + cscope 教程。