Tagbar checks for ctags even when it is not needed
Gys opened this issue · 1 comments
I use MacVim to develop in Go. There is the really useful gotags (https://github.com/jstemmer/gotags) to generate the tags. It comes with a .vimrc setting specifically for tagbar.
Initially I could not get this to work because MacVim / Tagbar kept complaining about not finding an up to date ctags version. The message is confusing because I thought it would call gotags for editing .go files. Why complaining about ctags ?
Luckily I found this: https://github.com/xolox/vim-easytags#the-plug-in-complains-that-exuberant-ctags-isnt-installed
And indeed, looking in the tagbar code I found a check. Failing, because OSX by default only has an old version.
I think this check should not be done if something like 'tagbar_type_*' is defined with a 'ctagsbin' var for the file at hand. Because in that case ctags will not be called. Or maybe add into the message that ctags is needed whatever file is being edited, as a failover or something.
My workaround:
I renamed the /usr/bin/ctags to ctags_old
I create a small bash file /usr/bin/ctags with 'echo Exuberant Ctags 5.5'
This way tagbar is satisfied and I can edit my Go files.
This is a duplicate of #94. Once I have more time to finish the new plugin this issue will go away.