Why does fugitive modify my tags variable? #104

Closed
idbrii opened this Issue Sep 2, 2011 · 12 comments

Comments

Projects
None yet
4 participants

idbrii commented Sep 2, 2011

In function! s:Detect(path), fugitive modifies the tags variable. Fugitive only reads the variable to see if it's already modified it.

So when I edit fugitive, I have extra paths in my tags variable:

tags=./tags;/,~/.vim/bundle/fugitive/.git/vim.tags,~/.vim/bundle/fugitive/.git/tags

These tags files don't exist. There's nothing in the help explaining it either. What's going on?

Owner

tpope commented Sep 2, 2011

It's just a convenience for http://tbaggery.com/2011/08/08/effortless-ctags-with-git.html. If you don't need it, it's pretty benign. It does need to be documented though.

I'm trying this out. I setup my git hooks as specified in your post, the tags file gets generated in .git/tags, fugitive sets the tags file appropriately, but whenever i do :tag it says "E433: No tags file".

What do you think might be the problem?

Owner

tpope commented Feb 1, 2012

Sounds fine to me. Double check those assertions. Does the tags file look okay?

Yeah, the tags file is in the right place. &tags setting looks correct, and the lines in the tags file looks good. I even tried it with "vim -u NONE -U NONE" and did "setlocal tags=..." by hand and I still get "No tags file".

I tried generating a tags file in a location where the global &tags setting looks, and that works. It only seems to have a problem with the buffer specific setting.

Owner

tpope commented Feb 1, 2012

Doesn't make sense. You must be missing something.

:( If this were happening with you, what would you try?

Owner

tpope commented Feb 1, 2012

Well for starters, you haven't even established if the global/local dichotomy is relevant:

  1. Try putting the git tags file in the global option.
  2. Try putting a different path in the local option.

Hmmm. Seems I had .git in the wildignore setting. Thanks for your help :)

@tpope tpope referenced this issue Mar 1, 2012

Closed

Gcommit fails #119

leemars commented May 31, 2012

Is it possible to provide a option to switch this feature off?

Owner

tpope commented May 31, 2012

Definitely possible. Why do you need to turn it off?

leemars commented Jun 1, 2012

It makes both me and the AutoTag plugin confused when I use fugitive first time and check tags variable of vim. I hope that I can manage tags manually. By the way, the feature is undocumented, isn't it?

tpope added a commit that referenced this issue Oct 2, 2012

Owner

tpope commented Oct 2, 2012

Merging #256 should have solved this pretty elegantly.

@tpope tpope closed this Oct 2, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment