2

I am attempting to use to the :help command in Neovim however the following error is returned:

E432: Tags file not sorted: /Users/seeker/.config/nvim/plugged/nerdtree/doc/tags
E432: Tags file not sorted: /Users/seeker/.config/nvim/plugged/fzf.vim/doc/tags
E432: Tags file not sorted: /Users/seeker/.config/nvim/plugged/emmet-vim/doc/tags
E432: Tags file not sorted: /Users/seeker/.config/nvim/plugged/coc.nvim/doc/tags
E432: Tags file not sorted: /usr/local/Cellar/neovim/0.4.2/share/nvim/runtime/doc/tags

How do I resolve this?

2

This is an indication that the tags files that work as indices for the help system are not sorted as expected. Vim/NeoVim wants those to be sorted so it can quickly find a help item in those files without having to read the whole contents of all those files

You can try to regenerate the tags files for all doc directories with:

:helptags ALL

Since these indices are created from the documentation files, you can always safely recreate them. But it's hard to tell whether that's enough to fix your issue or not.

I've had this issue one time, with Vim, on a somewhat odd platform. I didn't manage to understand why the tags files were created incorrectly, but I noticed that I could work around the issue by enabling the 'ignorecase' option (possibly also 'smartcase'), which makes Vim search the tags file for case-insensitive matches, in which case it doesn't really depend on the sort order of the files.

(So while they're possibly still unsorted and you don't get the quick binary search that's possible when they are, you're effectively opting out of that by requesting case-insensitivity. I didn't have noticeable performance issues using the help system and following tags there with this option set. YMMV.)


UPDATE: According to this commit it's a bug related to how lseek() works on specific platforms, and it seems it's broken on MacOS Catalina.

This has been fixed upstream, so latest NeoVim or Vim will be fixed. (In the case of Vim, version 8.1.2152 or later will contain the fix.)

| improve this answer | |
  • 2
    That’s the second time in two days you’ve helped me now! After running the above command I am able to use :help as intended. Thanks – seeker Feb 18 at 20:15
  • @seeker Glad I could help! I'm a bit bummed that I didn't get to the bottom of this one yet... I assumed it was a bug related to my unusual architecture... But since you're seeing this in NeoVim, perhaps there's more to it? I wonder if this is related to encodings somehow... – filbranden Feb 18 at 22:45
  • 1
    You may find this helpful: github.com/vim/vim/issues/5039 – seeker Feb 19 at 0:16
  • 1
    @seeker Awesome! So it seems this was fixed upstream, nice to know! Updated my answer to include that information (including exact version of Vim when this was fixed.) Thanks! – filbranden Feb 19 at 0:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.