Generating help files for vim

Currently I write my documentation directly as vim help files. Sometimes I need to generate other formats (e.g. PDF). My work flow is to copy the content of the help files and transform them into something I need. This is quite a tedious work, since I mostly have to add additional markup.

I like the approach of Markdown, which can (e.g. using Pandoc) be transformed into a variety of output formats. Unfortunately not vim help files. I am looking for a converter that takes a standard input format (e.g. XML, Markdown, reStructed Text, plain text, …) and outputs a vim help file. Or is there any other means of automatically generate vim help files without writing such a converter myself?


Sorry for resurrecting a very old thread. I'm the author of the mkd2vimdoc script behind the first link suggested by lornix previously. I recently rewrote mkd2vimdoc from the ground up as html2vimdoc. It still supports Markdown as input format; it will convert Markdown to HTML and then convert that HTML to a Vim help file. The focus during the rewrite was on support for a wider range of input documents.

The new script is being used by myself and several other plug-in authors so it is definitely intended for general use. If you'd like to give it another try, I'd love to hear if it now works better for the documents you want to use it on. If it still doesn't work, feel free to create an issue on GitHub.


I found this script, which the author created to convert markdown to vim documentation. Sounds very close to what you're looking for.

While this vim.org script (github repo) converts markdown into what looks like almost everything BUT vimdoc. (sigh) So close... maybe a slight modification?