spacemacs/layers/+tags/cscope
syl20bnr ebe4c60264 Revert "Defer packages by default using use-package-always-defer"
This reverts commit 29c78ce841 and all other fixes
that have been made afterwards.

The motivation is that use-package is seen by many as a replacement for
`require`. Is use-package always defer the loading of packages then is breaks
this use case, this does not respect POLA so even if it was making Spacemacs
loading faster (up to 3s faster on some startup on my machine) we just cannot
use it, it would be irresponsible. Spacemacs should be easy to use, loading
performance will come with time but it is not a priority.
2018-03-03 23:40:10 -05:00
..
img
packages.el Revert "Defer packages by default using use-package-always-defer" 2018-03-03 23:40:10 -05:00
README.org Fix doc for cscope, geolocation, wakatime, prodigy and smex layer 2017-12-27 20:20:32 +02:00

Cscope layer

/TakeV/spacemacs/media/commit/59e0c5683aed94f9ccc37256cafb5cebb1934275/layers/+tags/cscope/img/cscope.jpg

Description

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

See here for a comparison between Cscope and other similar tools (such as gtags).

Features:

  • Tag indexing and searching for C-C++ via Cscope
  • Tag indexing and searching for python via PyCscope

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

Enable c-c++ layer in your ~/.spacemacs file. 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

Enable python layer in your ~/.spacemacs file. 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 = Find assignments to a symbol
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