Translation(s): none

This page is dedicated to the installation, configuration and integration of the free-software tool
for browsing source code symbols and definitions known as Cscope on Debian.
Cscope Manual Page

What is Cscope ?

"Cscope is a developer's tool for browsing source code. It has an impeccable Unix pedigree, having been
originally developed at Bell Labs back in the days of the PDP-11. Cscope was part of the official AT&T
Unix distribution for many years, and has been used to manage projects involving 20 million lines of code!"

Cscope allows searching code for a variety of occurrences, including:

The fuzzy parser was mainly designed for browsing C code, but is flexible enough to be used with C++/Java and general large text files (grep database).
The tool also features a command line mode, suitable for scripting/GUI backend work.
Cscope runs (and is frequently available in the native repositories) on a variety of *Nix operating systems, including GNU/Linux and BSDs.
Cscope also features Windows/MacOS support, though integration with other Unix based tools is tricky.


On Debian, a simple sudo apt-get install cscope should do.
Sources are available over at Sourceforce.

Vim integration

Note: (NOT in Debian's case) If your version of Vim wasn't compiled with '--enable-cscope', you will need to reconfigure and recompile Vim with that flag.
You can check if your version of Vim is compiled with the cscope flag by issuing the following command: vim --version | grep "cscope".
If the output contains "+cscope" then your version of Vim has cscope support.

A full tutorial on Cscope+Vim is available at

Footnote: In my personal use, the latest versions of Vim+Cscope don't accept the default
Control-backslash modifier combination, resulting in a broken experience.
I personally swapped the CTRL-\ modifier combination in the cscope_maps.vim file to an unused key such as 'z'.
Thus the full key combination becomes just z+s, z+f , etc.