Is there way to search many results of cscope command in vim ?

456 views
Skip to first unread message

danguria

unread,
Dec 22, 2011, 5:23:34 AM12/22/11
to vim_use
Hi. I'm vim user.
I use vim to read the android framework source code with cscope and
ctags.
when I don't know where some file's location, I use cscope command
like that
:cs find f filename

sometimes, the result of cmmand is too many. because the file name is
common.
that time, I hard to find the result what I want to read.

In this case, Is there way to search many results of cscope command in
vim ?

Gary Johnson

unread,
Dec 22, 2011, 11:20:14 AM12/22/11
to vim_use

You can display all the cscope results in a quickfix window by
executing

:copen

You can then search in this window using standard search commands.
Hitting Enter on any line will open that file in the other window.

Regards,
Gary

Ben Fritz

unread,
Jan 29, 2013, 12:13:24 PM1/29/13
to vim...@googlegroups.com, gary...@spocom.com
On Monday, January 28, 2013 8:39:19 PM UTC-6, JoongKeun Kim wrote:
>
> Hello I am JK. I have same problem on cscope with vim.
>
> previous recommendation using ":copen" is now work for me.
>
>

What do mean by "is not working for me"? Do you mean :copen shows no results? Do you mean it shows results but too many so that you cannot easily choose which is the right one?

>
> for description this problem
>
> If I want to go the symbol definition like "Activity" in android (it is very common symbol), there are so many results over 100, therefore I hardly can choose which one is correct, even if there are already information that can be used (ex: import, inheritance). is there any automatic way to do this? at least filter-out invalid candidates?

No, you can't filter the list automatically. What are invalid candidates? How would Vim know?

Reply all
Reply to author
Forward
0 new messages