spacemacs/layers/cscope
syl20bnr 33ead6fc42 Deprecation of extensions and <pkg>-excluded-packages variables
As announced in previous releases, see CHANGELOG.next for more info
in the Breaking Changes section.
2016-01-17 22:06:04 -05:00
..
img
packages.el Deprecation of extensions and <pkg>-excluded-packages variables 2016-01-17 22:06:04 -05:00
README.org Update install layer section in REAMDE.org files 2016-01-06 00:21:55 -05:00

Cscope layer

/TakeV/spacemacs/media/commit/a5fdf4384550b71b4b72f75b2e1e8ae4aa4715dd/layers/cscope/img/cscope.jpg

Description

This layer provides bindings for using Cscope and PyCscope in Spacemacs.

Cscope provides indexing and searching capabilities for C and C++ code. PyCscope extends these capabilities for Python code as well. See here for a comparison between Cscope and other similar tools (such as gtags).

Install

Layer

To use this configuration layer, add it to your ~/.spacemacs. You will need to add cscope to the existing dotspacemacs-configuration-layers list in this file.

Cscope

Install Cscope through your package manager, or download it from the website and build it from source.

From package manager (for example, Ubuntu):

sudo apt-get install cscope

From source:

tar xvf cscope-15.8b
cd cscope-15.8b
./configure
make
sudo make install

PyCscope

Install PyCscope through pip:

pip install pycscope

Usage

Before using any helm-cscope commands, remember to create a Cscope index file. Do it by running the command cscope-index-files for C and C++ projects, or the command cscope/run-pycscope for Python projects, bound to SPC m g i.

Key bindings

Key Binding Description
SPC m g c find which functions are called by a function
SPC m g C find where a function is called
SPC m g d find global definition of a symbol
SPC m g e search regular expression
SPC m g f find a file
SPC m g F find which files include a file
SPC m g i create Cscope index
SPC m g r find references of a symbol
SPC m g x search text