vim-tags
vim-tags copied to clipboard
Empty tags file under .git
OS: RHEL5 Vim: 7.4 (compiled locally) Ctags: 5.6
Running "ctags -R ." creates the tag file successfully, however whenever I run ":TagsGenerate!" inside Vim, an empty tags file is placed under .git. I saw the other issue where the .gitignore file had entries that began with "!" were affecting the file generation, but it seems to have been fixed and none of my .gitignore entries have ! anywhere in them. Any ideas are greatly appreciated!
I have similar issue with empty file. I've traced it down and realised that it is due to backgrounding of file generation:
exe '!' . command '&'
That ampersand... It doesn't work with MacVim but works with console version. It makes think that it is due to shell specifics. I am using zsh (and in vim as well).
This has struck me also.
Environment: OS/X Shell: zsh vim: 7.4.873 running under tmux vim-dispatch installed and used.
Disabling use of vim-dispatch has allowed a tags file to be generated.
let g:vim_tags_use_vim_dispatch = 0
I also noticed an empty tags file in some of my projects that are managed by git. I often have the lines
.*
!.gitignore
in my .gitignore files. After removing .*
the tags generation with
:TagsGenerate!
works fine. Any ideas?
This happened to me when i had "ctags" in the gitignore file
same problem, any solutions here?
@axot I solved it by disabling vim-tags builtin ignore-file method like this: let g:vim_tags_ignore_files = []
. I instead ignore stuff in my ~/.ctags
config, eg:
--recurse=yes
--exclude=.git
--exclude=.venv
--languages=python
--kinds-Python=-Ivixzl
--tag-relative=yes
@simonwahlgren after setting vim_tags_ignore_files
, it works! Thank you.
In my case the tags file is correctly built but it is placed in the .git folder, instead of the root folder (therefore the folder containing the .git folder). Any explanation?
This is my vim-tags related section in my .vimrc:
let g:vim_tags_use_vim_dispatch = 1
let g:vim_tags_auto_generate = 0
let g:vim_tags_directories = [".git"]
let g:vim_tags_ignore_files = ['.gitignore', '.svnignore', '.cvsignore']
let g:vim_tags_use_language_field = 1
set tags=tags;