ludovicchabant / vim-gutentags

A Vim plugin that manages your tag files
https://bolt80.com/gutentags/
MIT License
2.3k stars 175 forks source link

questions about how to use the .gutctags #293

Closed irreallich closed 3 years ago

irreallich commented 3 years ago

vim-gutentags is a great tools and I really like it.
Now I try to read the linux kernel with vim, it is worked but the .tags file is very large(444M). I hope to ignore some files in the drivers and arch folder by .gutctags my questions:

  1. could I use " g:gutentags_cache_dir" and .gutctags together?

  2. I tried to disable g:gutentags_cache_dir , then the .tags ,GTAGS,GPATH,GRTAGS will be created in the root folder of source, it seems worked. when I add . gutctags with the following words --exclude=drivers/* or --exclude=drivers

the size of .tags is only 477 Bytes, it seems failed for ctags, GTAGS,GPATH,GRTAGS are ok. Is there problem?

ludovicchabant commented 3 years ago

Hi! Thanks!

  1. Yep you can.

  2. The reason for that is that when you specify a .gutctags, it replaces the default options file provided by Gutentags (which sets by default the --recursive=yes option). So you have to re-specify the recursive flag in your .gutctags. It's not super obvious, sorry about that... but I did want to make it possible for people to have full control over the options. Arguably I could control the default option with another flag but I was lazy...