spf13 / spf13-vim

The ultimate vim distribution
http://vim.spf13.com
Apache License 2.0
15.56k stars 3.63k forks source link

TagBar/ctags; ctrl-] not working. #301

Open kevinwaddle opened 11 years ago

kevinwaddle commented 11 years ago

On Ubuntu 12.04 LTS. I have ctags-exuberant installed.

In an open file pressing ctrl-] on anything always produces "E433: No tags file"

The spf13 documentation says that tag files will be created automatically by TagBar on open files and that ctrl-] should work. What am I missing?

spf13 commented 11 years ago

You need to install the ctags program.

Steve Francia http://stevefrancia.com http://spf13.com http://twitter.com/spf13

On Wed, Feb 20, 2013 at 1:24 PM, kevinwaddle notifications@github.comwrote:

On Ubuntu 12.04 LTS. I have ctags-exuberant installed.

In an open file pressing ctrl-] on anything always produces "E433: No tags file"

The spf13 documentation says that tag files will be created automatically by TagBar on open files and that ctrl-] should work. What am I missing?

— Reply to this email directly or view it on GitHubhttps://github.com/spf13/spf13-vim/issues/301.

kevinwaddle commented 11 years ago

ctags is installed. I can run it from the command line.

kevinwaddle commented 11 years ago

TagBar invokes ctags in a way that prevents it from a creating an actual tagfile. So ctrl-] cannot work using TagBar alone.

jchoi2x commented 10 years ago

So tagbar (or spf13) doesn't automatically generate ctags file for you also? I've tried getting the 'automatic tag file generation' to work with OS X and Linux and they've both failed on me; ctrl+] always says no tags file despite having exuberant-ctags installed

I have to manually create tag files and put it in the ctags path set tags=./tags;/,~/.vimtags but that kind of defeats the purpose of using TagBar for me and I rather not have it slowing vim down

rekendahl commented 10 years ago

I have the same issue. Would be nice to fix it to auto generate tags file!

bronzehedwick commented 10 years ago

+1

bronzehedwick commented 10 years ago

This doesn't solve the issue in spf13, but I found tpope's post about setting up automatic tag generation through git hooks very helpful. http://tbaggery.com/2011/08/08/effortless-ctags-with-git.html

wehlutyk commented 10 years ago

+1 to this, I have the exact same issue.

tswr commented 9 years ago

+1 =(

donglixp commented 9 years ago

+1 to this issue

yograf commented 9 years ago

+1 :(

ghost commented 9 years ago

+1

JinqiangZeng commented 9 years ago

+1 ):

petroslamb commented 9 years ago

For me this is one of the few serious advantages of pycharm. +1

lastjune commented 8 years ago

+1 the same issue

aftnix commented 8 years ago

:+1:

jimafisk commented 8 years ago

For some reason tagbar wasn't downloaded with spf13 on ubuntu 14, so I did it manually: git clone git://github.com/majutsushi/tagbar ~/.vim/bundle/tagbar Then just run ,tt to open. Doesn't really fix the ctrl-] issue but I was getting the same "No tags file" error.

yarbroughw commented 8 years ago

+1

bmeynell commented 8 years ago

Same issue here.

bmeynell commented 8 years ago

I'm using Ubuntu 14.04. Seems at least two others here are also on Ubuntu as indicated by https://github.com/spf13/spf13-vim/issues/301#issue-11209044 and https://github.com/spf13/spf13-vim/issues/301#issuecomment-178959381. Perhaps this is an Ubuntu-only issue?

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.3 LTS
Release:        14.04
Codename:       trusty
bmeynell commented 8 years ago

I think I have this working now. Previously I was getting (from my project directory root):

$ ctags -R *
ctags-exuberant: cannot open tag file : No such file or directory

To avoid this error I had to:

sudo su
ctags -R *

Then tags file was then generated (yay!).

To better fine-tune, what you want ctags to store, you need to create a .ctags file, also in the project root. Here's a quick example --> https://gist.github.com/chrisyue/6374262

Once you do that, re-create the ctags file.

You can then open up vim and use Ctrl+] as expected.