tags:

views:

262

answers:

1

I always use vim+cscope to check sysmbol definition, and I find cscope always take declaration like:

struct sk_buff;

as a defintiion, which make vim always show a long list files to choose, always drive me crazy. Indeed, I only want the definition:

struct sk_buff { ... };

Seems ctags can resolve this problem, but can cscope handle this? Or somethings I'm wrong.

I checked the cscope source, and I find it's hard to modify the lex and yacc source from beginning.

+2  A: 

You are correct, you cannot do this just with cscope.
I use cscope+ctags with vim every day on both small and large projects as well.
I've found the most productive way to use these tools is to use them both from within vim and with the cscope_maps.vim plugin.

This may not help you but it's helped me int he past, check this site for information on using them together. I'll warn you that if you use the cscope_maps.vim plugin you'll probably want to edit it and comment out the "set cscopetag" option.

Steve Lazaridis