在 KDE 平台上扩展 Zend Engine,gVIM 是正确的选择吗?
我正在尝试向 KDE 环境中的 Zend Engine 引入一些非常酷的概念。这是一种“深层核心”的东西,需要大量的资深 C 编码和围绕适度复杂的 C 代码库进行黑客攻击。
到目前为止,我认为大佬们使用 vim 和一系列众所周知的插件来完成从语法突出显示到代码完成等所有工作。然而,我没有理解的一件事是“项目”概念在维姆中。 Vim 是一个文本编辑器,所以 vim 中没有项目的概念是很自然的,但是一个人怎么可能使用一个不理解众多文件之间(语义)关系的编辑器来处理基于复杂的 c 代码的工作?代码库是一个连贯的整体(=项目)?只是为了说明我的意思,假设我正在查看
int a=zend_complie_file(file_path);
file1.c 中的内容,并且我想访问声明的 zend_compile_file()
在file2.c
中。另一个例子,我想要所有以“zend_”开头的函数(在整个项目的各个文件中定义),或者我想查看项目中访问变量的位置(注意“跨项目”常见主题)我的例子)。 vim 能为我做这些事情吗?
vim 是我正在执行的任务的正确选择吗?
I am trying to introduce few nifty cool concepts to the Zend Engine in a KDE environment. It's kinda "deep core" thing and requires lots and lots of veteran C coding and hacking around a moderately complex C code-base.
So far I think the big guys do it using vim and a bundle of well known plug-ins doing all the stuff from syntax highlighting to code completion etc. Yet the one thing I'm not getting my head around is the "Project" concept in vim. Vim is a text editor, so it is only most natural that there is no notion of Projects in vim but how possibly can one work on complex c code-based using an editor that does not understands the (semantic) relations between numerous files that make the code-base a coherent whole(=the project)? Just to make a concrete example of what I mean, suppose I'm looking at
int a=zend_complie_file(file_path);
which is in file1.c
and I want to get to the zend_compile_file()
which is declared in file2.c
. As another example, I want all the functions that start with "zend_" (defined in various files across the project) or I want to see where a variable is accessed in the project (pay attention to the "across the project" common theme in my examples). Can vim do these kinda stuff for me?
Is vim the right choice for the task I'm undertaking?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用ctags,您问题中的具体示例非常简单:方法的声明通常仅相距
。要获取名称以
zend_
开头的所有函数,您可以执行:tag /zend_
然后点击
。相反,cscope 通常用于查找变量的用法。
SO 上有很多与标签相关的问题,最重要的问题对我非常有帮助。
您还可以在 Vim wiki 上查看这个内容丰富的页面。
但我认为您正在寻找的是像 Eclipse 这样的 IDE。
The specific example in your question is very easy if you use ctags: the declaration of a method is usually only a
<C-]>
away.To get all the functions with names starting with
zend_
you would do:tag /zend_
then hit<Tab>
.Conversely, cscope is commonly used to find a variable's usage.
There are a bunch of tags-related questions on SO, the top ones have been very helpful to me.
You can also check out this extensive page on the Vim wiki.
But I think that what you are looking for is an IDE like Eclipse.