3

I use < C-\ >C to get the callers of one function, then I can press one number to jump to one caller. But if I want to jump to another caller, I had to press < C-T> to jump back, and press < C-\ >C again to get the caller list. Does cscope support history list recording ?

river
  • 694
  • 6
  • 22

3 Answers3

4

If you are using VIM, you can try quick fix

:se cscopequickfix=s-,c-,d-,i-,t-,e-

Navigate next or previous result with :cn :cp

Use :cw to display cscope search result.

Ben
  • 56
  • 1
3

For one thing, you can use

:se cscopetag

or

:lcscope ....
:lopen

With the latter you can even use :lolder and :lnewer to switch back and forth between previous cscope queries.

he cscopetag:

If 'cscopetag' set, the commands ":tag" and CTRL-] as well as "vim -t" will always use |:cstag| instead of the default :tag behavior. Effectively, by setting 'cst', you will always search your cscope databases as well as your tag files. The default is off. Examples:

:set cst
:set nocst

That way you you just

:tnext
:tprev

like always.

Alternatively, you can use

sehe
  • 374,641
  • 47
  • 450
  • 633
  • Thanks, how can I get the past cscope search lists liking sourceinsight , and store the lists . – river Nov 21 '11 at 08:21
  • "Liking sourceinsight" ? (huh) And store them? Erm, in the quickfix/location list issue `:w scopetags.list`...? – sehe Nov 21 '11 at 09:09
  • What I want to describe is that how can I get the past cscope search list without jump back and repeat the same cscope command. I still don't know how to do from your copied manual. – river Nov 22 '11 at 03:03
1

I have no real experience with cscope but take a look at :help cscopequickfix: with this option set the <C-\>c results are supposed to appear in the quickfix window.

romainl
  • 186,200
  • 21
  • 280
  • 313