[英]cross-reference for multiple-language project
I am currently maintaining a project which is a large multi-language project including python
, perl
, bash
and c/c++
languages.我目前正在维护一个大型多语言项目,包括
python
、 perl
、 bash
和c/c++
语言。 My current IDE is vim with YouCompleteMe
plugin.我当前的 IDE 是带有
YouCompleteMe
插件的 vim。
The problem of using this is that ycm
more or less supports only one language for a project.使用这个的问题是
ycm
或多或少只支持一个项目的一种语言。 Therefore, sometime when I encountered a c
command called in a bash file, it took me a while to search what is the source code of such command, which I could not use goto
functionality based on ycm
.因此,有时当我遇到在 bash 文件中调用的
c
命令时,我花了一段时间搜索该命令的源代码是什么,我无法使用基于ycm
的goto
功能。
I therefore wonder if there is a way to support such "cross-reference intellisense", eg, I could goto
a c
or python
command in a bash file?因此,我想知道是否有办法支持这种“交叉引用智能感知”,例如,我可以在 bash 文件中
goto
c
或python
命令?
It is not very intelligent , but a tool like Universal Ctags , that supports dozens and dozens of languages, can be used to index your whole project and Vim's built-in tag-related commands can be used to jump to the definition of anything in any filetype as long as there is a tag for it.它不是很智能,但是像Universal Ctags这样的工具,支持几十种语言,可以用来索引你的整个项目,而且 Vim 内置的标签相关命令可以用来跳转到任何东西的定义。文件类型,只要有标签即可。
See :help tags
.请参阅
:help tags
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.