Generating tags to different location by pathogen

为君一笑 提交于 2019-12-18 10:44:38

问题


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?


回答1:


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.




回答2:


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  



回答3:


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


来源:https://stackoverflow.com/questions/4343544/generating-tags-to-different-location-by-pathogen

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!