15

I use pathogen for organizing my vim plugins. I git clone the plugins from github into the vimbundles directory. This way it is simple to update them.

I have problem with the tags generated by pathogen. If the plugin does not have the tags included in its code, pathogen generates them by calling pathogen#helptags(). The tags are generated into the doc folder of the plugin. These files then figure as untracked in git repository.

Do you know a way how to generate tags into a different location? All tags could be on the same place, the goal is not to have them generated to the directory where the plugins live. Can pathogen be convinced to do so?

3 Answers 3

34

As far as I can tell, pathogen just runs :helptags on the doc directory included in the bundle and vim puts the tags file there. I am not aware of a setting to change this behavior.

I offer my workaround as it's a bit different than the others since I store all of my bundles as submodules of a larger repo. Rather than modifying the repo's .gitignore or .git/config, I just add ignore = untracked to the submodule's entry in .gitmodules, e.g.:

[submodule "vim/bundle/nerdcommenter"]
    path = vim/bundle/nerdcommenter
    url = http://github.com/scrooloose/nerdcommenter.git
    ignore = untracked  
12
  • I like this approach, but for some reason it does not seem to work. I added the ignore = untracked line to the relevant section(s) of the gitmodules, but the submodules still show up in the main repo for git st.
    – fifigyuri
    Dec 4, 2010 at 8:47
  • Can you try a fresh checkout of the submodule to ensure you have no other local changes? Also I'm not sure if it matters but try committing the .gitmodules, it may act like.gitignore and not work until committed, I don't remember. Dec 4, 2010 at 12:19
  • This is how I do it. I think, it's the cleanest way, as you shouldn't commit changes to submodules anyway. As helptags are generated on every system anyway, there won't be any incompatibilities due to the uncommited changes.
    – bestform
    Feb 7, 2011 at 8:22
  • @mattalexx - any information other than it doesn't work? (Also, I just fixed a typo that somehow made it in my paste, but is probably unrelated to your problem) Apr 14, 2011 at 21:21
7

Randy's answer works best for me. A one liner I use when I want to add the ignore = untracked option to a lot of submodules is:

for s in `git submodule  --quiet foreach 'echo $name'` ; do git config submodule.$s.ignore untracked ; done
2
  • This command adds the configuration line to .git/config file instead of the .gitmodules file. You need to use git config -f .gitmodules ... to modify the correct file. Although even that seems not to work for me.
    – Marcin K
    Apr 9, 2018 at 4:27
  • To get this to work I had to git submodule init and git submodule update, than the update took effect
    – Marcin K
    Apr 9, 2018 at 4:39
4

I have this line i my .git/config:

[status]
   showUntrackedFiles = no

And now every time i run git status untracked files are not displayed. This also speeds up things a bit since git does not check every single file in directory but only those existing in repository.

For more info go to http://git-scm.com/docs/git-config and go to status.showUntrackedFiles.

Edit: Forgot to mention that I also have submodules in bundle directory and I add mentioned option to top-most repository config.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.