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

Use multiple tags files for hilighting #23

Closed jreybert closed 12 years ago

jreybert commented 12 years ago

Hi,

I am using easytags with a big project. I set up easytags like:

let g:easytags_dynamic_files = 1 let g:easytags_include_members = 1 set tags=./tags;,~/.vimtags set tags+=/path/to/project/sub1/tags,/path/to/project/sub2/tags

vim handle the multiple tags files very well, sorry. Let say I am in /path/to/project/sub1/, tselect myfunction_fromsub2 wroks like a charm.

But functions_fromsub2, define_frosub2 are not highlighted.

xolox commented 12 years ago

This should be working fine (and in fact it does work for me, I frequently have Vim highlight tags in multiple tags files). The easytags plug-in has two ways to highlight tags:

  1. There is a Python version that uses the list of tags files returned by Vim's tagfiles() function;
  2. There is a Vim script version that uses the tags returned by Vim's taglist() function.

Since both methods of highlighting use functions defined by Vim to find tags, the tags from all tags files should already be included in the highlighting. Is it possible that one or more of those tags files were not created by the easytags plug-in and don't include the language:... property on each line? Because that will definitely break the highlighting of those tags (see also the documentation).

jreybert commented 12 years ago

OK, I think the problem was from my tags settings in vim, not easytags.

Thanks