How to find offending format error in Vim tags file

I found some extra lines present before !_TAG_FILE_FORMAT line in the generated tags file.When i remove these extra lines, vim starts working.


Really long function names can cause this error. You can find these functions by opening the tags file in vim and looking for method names longer than 50 chars.

/^[^\t]{50,}

The tags database is line-oriented; after the header (line(s) starting with !_TAG_FILE_...), each line corresponds to a tag.

By using binary search, you should be able to quickly locate the offending line(s): Save a copy of the tags file, remove one half, test. If you still get the error, repeat (until you're down to one line). Else, take the other half and repeat.

This is a general troubleshooting technique; for example, it's also helpful to locate problems in Vim plugins (by disabling one half of them).

Tags:

Vim

Tags