xolox / vim-easytags

Automated tag file generation and syntax highlighting of tags in Vim
http://peterodding.com/code/vim/easytags/
1.01k stars 109 forks source link

Can't save tags file in .git subdirectory #77

Open aktau opened 10 years ago

aktau commented 10 years ago

I've been scratching my head about this for quite a while, as I think it's a good idea to keep the tags file in the .git subdirectory when it exists.

It appears this manifests itself in the xolox#misc#option#eval_tags function. There, expand() is used on every piece of &tags. However, every filename that matches something in &wildignore gets... ignored. I'm not sure it's supposed to be the case that this happens. But what would be a suggested workaround for this?

So, what I would like:

How would I be able to do this?

Thanks!

aktau commented 10 years ago

By the way, I've succesfully tested replacing:

# call extend(pathnames, split(expand(pattern), "\n"))
call extend(pathnames, split(expand(pattern, 1), "\n"))

This is the {nosuf} argument which makes vim &wildignore...

jcppkkk commented 5 years ago

Here is my settings

let g:easytags_dynamic_files = 2
let gitroot = system("git rev-parse --show-superproject-working-tree --show-toplevel | head -n1 | tr -d '\\n'")
autocmd BufReadPre,FileReadPre * execute !empty(gitroot) ? 'setl tags=' . gitroot . "/.git/vimtags" : 'setl tags=~/.vimtags'