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. Commented 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. Commented Nov 22, 2015 at 14:18
  • Using tags and jumps accomplishes the same thing, in the current help format. Commented Nov 22, 2015 at 16:22
  • @VanLaser: Hm, I'm new to tags. How would that look? The folding part specifically. Commented 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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.