Closed aonofriichuk closed 8 years ago
I have thought about this. Usually with g
, you'd want jump directly to the definition. That's why I have not included g
in the cscopequickfix
list.
I need to figure out the number of results for cs find g
and show them in quickfix only if there are more than 1 results.
Another problem is, when I add g-
to cscopequickfix
, jumping to tag and going back breaks. Somehow the tag doesn't get added to the tag stack. So going back using Ctrl T
doesn't work anymore.
EDIT: This applies to all commands, not just g
. Looks like I was using Ctrl T
just for g
.
This is because when using quickfix window, the results are only sent to quickfix and not taglist. Best alternative is to use Ctrl O
(jumplist) in such cases.
Probably I'll add a configurable option to use quickfix window for g
results too.
I've added a configuration behavior for this option as part of commit 2ab2446.
You can add following to your vimrc
to get quickfix window for g
also.
let g:quickr_cscope_use_qf_g = 1
Many thanks, Ronak! For my use cases the plugin is great! :)
Hey Andrew, you might be interested in a small plugin I wrote for previewing quickfix results, rather than opening the files.
jumping to tag and going back breaks.
I know its very old post, Please let us know if there is any workaround to save jumps in historical tag list if quickfix is used.
Hi Ronak,
I was able to fix this issue by changing mapping of the 'scope find g' command to: nnoremap (quickr_cscope_global) :call quick_cscope(expand(""), "g")
and cscope qf options to:
set cscopequickfix=s-,g-,d-,c-,t-,e-,f-,i-
Now I can view 'scope find g' search results in quick fix window too. It will be great to support this feature in the next release, If you have plans to support quick fix for 'scope find g' command.
Regards, Andrew.