ludovicchabant / vim-gutentags

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

tag file is very large #245

Open GeekerFeng opened 4 years ago

GeekerFeng commented 4 years ago

Describe the bug when I read the linux kernel source code , generating tag file is very large, 1000M size, when I press ctrl+], tell me "431: Format error in tags file" . in my source, it is works fine

Steps to reproduce

  1. just read the linux kernel source code

Share your setup let g:gutentags_project_root = ['.svn','.git','.root','MAINTAINERS', 'COPYING','.project']

"let g:gutentags_trace = 1

let g:gutentags_file_list_command = { \'markers': { \'cscope.lst': 'taglslist', \'.git': 'taglslist', \'MAINTAINERS': 'taglslist', \'COPYING': 'taglslist', }, }

let g:gutentags_gtags_options_file = '.gtags.optconf.log' let g:gutentags_ctags_tagfile = '.tags'

let g:gutentags_modules = [] if executable('ctags') let g:gutentags_modules += ['ctags'] endif if executable('gtags-cscope') && executable('gtags') let g:gutentags_modules += ['gtags_cscope'] endif

let s:vim_tags = expand('~/.cache/tags') let g:gutentags_cache_dir = s:vim_tags

Post the logs E431: Format error in tags file "/home/pynix/.cache/tags/home-pynix-kernel- .tags"

ls -lh

drwxr-xr-x 2 pynix pynix  4.0K  8Mon 27 13:53 home-pynix-Disk-kernel-
-rw-r--r-- 1 pynix pynix 1000M  8Mon 27 14:16 home-pynix-Disk-kernel-.tags
ludovicchabant commented 4 years ago

It looks suspicious that the tags file would be exactly 1000M... could you try running ctags manually and see if it generates an OK tags file? Either just ctags -R . at the root of the source (to start simple), or by setting let g:gutentags_trace = 1 and grabbing the full command line from the Gutentags log (to reproduce exactly what Guentags is doing).