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.




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. 




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"




GNU image from link


Please reload

Our Recent Posts

DOE PAMS Specialties

September 5, 2020

Good Link for HOWTO Bring an Off-Screen Window Back Onto Screen for Windows 10, 8, 7, and Vista

September 5, 2020

Connect to and Control a Synaccess NPC-22 netCommander from Ubuntu 16.04.3 Running in a VirtualBox VM via a Prolific Technology Inc. USB to Serial Port Converter to Turn a Target On and Off

September 4, 2020

Please reload


Please reload


©2020 by Zach Pfeffer