0

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?

Charles
  • 50,943
  • 13
  • 104
  • 142
Ashkan Kh. Nazary
  • 21,844
  • 13
  • 44
  • 68

1 Answers1

0

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.

romainl
  • 186,200
  • 21
  • 280
  • 313