Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cscope error when trying to use ctags in vim

Tags:

vim

ctags

cscope

I have generated ctags for my projects:

ctags -f /home/grae/tags --recurse --langmap=C++:.C.h.c.cpp.hpp.inl --languages=C++ --extra=+q --fields=+iaS --c++-kinds=+p --verbose framework/ modules/ /usr/include/

I then added the tags to .vimrc:

set tags+=/home/grae/tags

I also temporarily added the following (but have now removed):

set csto=1

Now when I try Ctrl+] or g] I get the error:

cstag: tag not found

I shouldn't be using cscope so I'm not sure how this has happened. My current thoughts are:

* cscope on by default
* something has overriden Ctrl+] and g]

Any ideas how to solve this?

like image 674
Graeme Avatar asked Feb 24 '23 07:02

Graeme


1 Answers

Found an answer when inspecting :options, you need to turn off cscope by using:

:set nocst
like image 200
Graeme Avatar answered Feb 27 '23 13:02

Graeme