Vi + Cscope: using "cscope find c function" in vim, finds multiple results, how to go next
Asked Answered
C

4

5

When I used this command to search functions who call this function, if there are more than one result, only the first one showed in the buffer, how do I go to the next one with a vi command or shortcut keys?

Curb answered 9/12, 2010 at 14:52 Comment(0)
A
3

use

:help tag-matchlist to learn more

:tnext goes to next match and

:tprev goes to the previous one

Antonomasia answered 7/3, 2014 at 16:33 Comment(0)
T
5

I guess your have modified your .vimrc following the instruction in this page http://vim.wikia.com/wiki/Cscope .

If I am right, try to delete these lines from .vimrc to see if it works :

if has('quickfix') set cscopequickfix=s-,c-,d-,i-,t-,e- endif

It works for me.

Transcript answered 18/4, 2011 at 2:56 Comment(2)
Hi, Thanks for the information! I did followed that link. Now I commented out that line you pointed out. My question is what is the command to go to next finding then. Could you let me know? Thanks!Curb
to go to the next item, use ":cn", to go to previous, use ":cprev", to go to 3rd item(say) in the list, ":cc 3"Id
A
3

use

:help tag-matchlist to learn more

:tnext goes to next match and

:tprev goes to the previous one

Antonomasia answered 7/3, 2014 at 16:33 Comment(0)
O
1

Try below commands :cw :cl :cn :cprev :cc

Oliphant answered 7/8, 2019 at 3:45 Comment(0)
R
0

You can use space bar which scrolls to next page of search result , then you can use up/down arrow key to select the file you like to open by hitting enter or any key ,you also know how lines matched for your search at the bottom , while you press space bar you will see the line matched will get decrease ,bcoz we are scrolling the search result page .once you reaced the last page, it will again start from first .

Regards,

Tamil

Recitation answered 28/3, 2013 at 6:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.