Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim picking up Cscope command instead of ctags?

Tags:

vim

ctags

cscope

I have installed ctags but not installed cscope.

When I press Ctrl-], vim correctly takes me to the definition. However, when I press Ctrl-t, it replies back with error - "E567: no cscope connections".

vim --version has +cscope in it. I tried setting "set nocst" in my vimrc, but to no avail.

like image 889
Pratyush Rathore Avatar asked Oct 17 '22 17:10

Pratyush Rathore


2 Answers

Try:

:set csto=1

From the documentation http://vimdoc.sourceforge.net/htmldoc/if_cscop.html#csto

The value of 'csto' determines the order in which |:cstag| performs a search. If 'csto' is set to zero, cscope database(s) are searched first, followed by tag file(s) if cscope did not return any matches. If 'csto' is set to one, tag file(s) are searched before cscope database(s). The default is zero.

I hope this will help you.

like image 69
Rishi Avatar answered Nov 24 '22 12:11

Rishi


You may have cscope_maps.vim installed. Or, perhaps another related cscope related plugin/bundle. If so, you'll need to remove it.

like image 28
gregory Avatar answered Nov 24 '22 13:11

gregory