1

I often find navigation of :help files to be cumbersome. Given that they are mostly structured information, is there an existing way of using this structure for initially folded display?

E.g. after installing a new plugin, I'd like to browse the :help [plugin] by looking at the folded TOC. In a perfect world, after opening help I can see all of the top level help topics and I can descend into any one using zo/zO/similar.

Do you know of a plugin that provides syntax folding for help files, or is there some other easy way to get this working?

4
  • There is already a TOC at the top of every help file.
    – romainl
    Nov 22, 2015 at 12:16
  • That's great, but I want it folded, and folded by default. That's the point of my question. Nov 22, 2015 at 14:18
  • Using tags and jumps accomplishes the same thing, in the current help format.
    – VanLaser
    Nov 22, 2015 at 16:22
  • @VanLaser: Hm, I'm new to tags. How would that look? The folding part specifically. Nov 22, 2015 at 16:45

1 Answer 1

1

Forget the folding. Use something like this in your vimrc:

autocmd FileType vim,help setlocal keywordprg=:help

... and then you can hit K every time your mouse is on a help keyword/tag, to jump directly to that help topic. To jump back, you can use Ctrl-o. This also works for the right part of each line from the TOC (hence its usefulness), and it's more powerful than folding - you can jump between files, and back to were you started.

Your Answer

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

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