©2018 by Zach Pfeffer

SEARCH THIS SITE

Quickly Enable cscope in Vim

May 1, 2018

 

 

 This post list a set of steps to quickly start browsing code in vim. Its a short version of http://cscope.sourceforge.net/cscope_vim_tutorial.html

 

1. Install cscope with:

 

2. Make ~/.vim/plugin

 

3. Copy this into a file called ~/.vim/plugin/cscope_maps.vim:

 

4. Run this in your source tree:

The cscope status bar will grow:

 

Until it completes:

 

 

5. Type Control+d to quit.

 

6.  Open a source file. Move the cursor over a symbol and type: Control+\ s.

 

Note

 

A potentially more useful method is to present the result in a split window. With the cursor over the symbol of interest, type Control+spacebar s. Type Control+w arrowkey to enter the window. With the window selected, type Control+w q to close the window.

 

Note 2

 

In addition to s you can use these: 

...from ~/.vim/plugin/cscope_maps.vim

 

7. Type the # of the result. 

 

Example

 

Type 2 to jump to cdns_wdt_probe 

 

8. Type Control+t to get back to where you were, i.e. "popping off the tag stack"

 

 

Reference

GNU image from link

 

Please reload

Our Recent Posts

Business Classifications from Sandia National Laboratories

March 24, 2020

"Guidance for Completing the Company Commercialization Metrics Survey" from NASA 2020 SBIR/STTR

March 21, 2020

Army 20.1 SBIR TABA Funding Clarification: is $5k "On Top" of the $167,500 Available?

February 18, 2020

1/1
Please reload

Tags

Please reload