Vim/Cscope quickie
anomit | October 10, 2009You can find a detailed tutorial here. This will only help you get started real soon with cscope.
First of all, you need to have cscope support compiled with your vim installation. Packages for vim offered by Ubuntu and Fedora already have it. In Gentoo, I had to add app-editors/vim cscope in /etc/portage/package.use for the cscope USE flag to be enabled.
With all the yak shaving out of the way, get down straight to business. Move over the cursor to any symbol or identifier in your source code and try out these:
- Ctrl-\-s: Search results are loaded in the same window
- Ctrl-Space-s: Search results are loaded in a horizontally split window
- Ctrl-Space(twice)-s: Search results are loaded in a vertically split window
You should also check out a link within that tutorial that will help you to use cscope efficiently with a large codebase such as the Linux kernel
PS: I forgot to mention that you need to install the plugin for these keymappings from the sourceforge project whose tutorial link I have already posted.






