0

I'm using vim's built in helptags command to create a tags file in LaTeX. While LaTeX files are not the txt files normally used, helptags seems to work just fine, and generates an empty "tags" file and a file titled "tags_te" which is actually the tags file. I add the tags_te file with "set tags+=tags_te" and almost everything works perfectly. Strangely enough, it did work perfectly the first time, but every time thereafter, I have had the following problem.

When I search for a tag, whether using ":tag InformationTopography" or Vim correctly navigates to the first instance of *InformationTopography*. However, entering ":tnext" takes me to the first instance of *InformationTopography* in the next file not to the next instance in the same file. Strangely the 'tags_te' file has all the instances listed correctly. I have tried moving the tags_te file to be the tags file, but no difference.

2
  • 1
    I'm have a hard time following: are you using :helptags to generate tags for a LaTeX file? Why? universal ctags does well for me with sections and their labels
    – D. Ben Knoble
    Commented Apr 9, 2020 at 15:15
  • Mostly because that was what I came across, but I am also manually entering tags in comments to track themes and ideas across the book. While I do want the tags file to show labels etc., I also want to be able to simply move one tag to the next. To the extent that the tag file is correct, I didn't worry about using ctags, since creating the tags file is not the problem, the navigation is. That's a long way of saying if using ctags fixes the problem, then I am happy to do that, but I suspect that it will just make a better tags file. Commented Apr 9, 2020 at 15:22

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.