I am trying to use cscope
with vim
and I find things a little confusing.
Let’s say I have a project in /home/user/projects/project_foo/
. If I go through cscope
directly it all works fine (I can find symbols). If I go through vim
I get no cscope connections
error. So I don’t understand how it works.
As far as I understand you have to build a database for your project, but when I run cscope [-R] [-b]
in project’s directory no file is created in this directory. So where is the database created? Is there a separate database for each project or a global database?
Do I have to rebuild the database each time I make a change to the project symbols (e.g. add a function)?
How do I make vim
(loaded from the project’s directory) to use the database for that project. If there is a global database can I make vim
search only within the current project?
I found some scattered information about this things but it is all very confusing for a first time user. If you could clarify these things it would make it more clear and I would be able to figure out the rest.