How to create tags for Eigen library and use them with OmniCppComplete?

139 Views Asked by At

I'm using the OmniCppComplete vim plugin and the autocompletion doesn't show anything related to the Eigen library (c++ library).

I first created a tags file with ctags recursively starting from the root directory of my Eigen files and linked the file in my .vimrc. Also tried several other locations (directly in the src folder of Eigen for example). This method should work since I managed to do it with other libraries.

I'm using Exuberant Ctags 5.8, vim 8.1 and the latest Eigen and OmniCppComplete versions available now.

Code used to generate the tags (from a ~/.vim/tags folder):

ctags -R --sort=yes --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ -f eigen ~/Documents/Librairies/Eigen/

Link in the .vimrc:

set tags+=~/.vim/tags/eigen

I should be able to autocomplete eigen functions with OmniCppComplete. When I type myVector.con (myVector is a VectorXd object), I should see conservativeResize() appear for example since it is used to resize a VectorXd.

I can't be totally sure of that but it may be because there are c++ and fortran files in Eigen so by using --language-force=C++, it creates a problem with fortran files but if I don't use it then it may ignore source files (without extension).

Does anyone have an idea about what's going on? (If I didn't give enough information, I'll give more)

0

There are 0 best solutions below