Using Cscope is quite handy but getting in and out of the vim for every search in cscope GUI is quite inconvenient. I have got something to share that help you to overcome this.
Building the database for Cscope
Execute the below command in the source directory (ex: myapplication/src)
$ cscope -b -q -R
Run the following command to use the cscope GUI for finding and parsing the files & definitions and redirects you to a cscope GUI as shown below
$ cscope -d

Using Cscope with Vim
Assuming you are in the folder where you have created the cscope database (check if you can see cscope.out file in the src directory)
Run vim command without a file name and this opens a new file, get the cscope menu by running the following command$ vim
(in new file from vim, esc + :cs)
$ cs

Use the add command of cscope to attach the database
:cs add cscope.out
To check if the database id successfully added use the following command:cs show

Now you can use your old way of cscope from vim, here are some examples:cs find g <some_function_name>
:cs find f <file_name>
Challenges while using Cscope with Vim
- I felt it is not convenient to landing a new file/definition which you searched for and missing the source file. We can avoid this by tuning the above command used,
:tab cs find g <some_function_name>
This makes your search open in a new tab and you can use :tabn and :tabp to switch between the next and previous tabs respectively.
:tab cs find f <file_name> - Have you thought of one big problem we will be facing here … case-sensitivity !!
To do this, you must set the csprg variable in vimrc. Add the following line in vimrc file and save the file.set csprg=cscope\ -C