Pratyush Rathore
Pratyush Rathore

Reputation: 147

Vim picking up Cscope command instead of ctags?

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.

Upvotes: 5

Views: 930

Answers (3)

gregory
gregory

Reputation: 13043

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

Upvotes: 1

Rishi
Rishi

Reputation: 1395

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.

Upvotes: 2

Arithran
Arithran

Reputation: 1299

If you already have ctags installed and you are trying to use an outline viewer for your code, I would recommend using https://github.com/majutsushi/tagbar. It works really well with just ctags.

If you are are using Vundle, install using

Plugin 'majutsushi/tagbar'

Upvotes: 0

Related Questions