Any tips for documenting vim script in reStructuredText?
Hi,
Discl: I'm not looking for plugins that help writing reStructuredText files.
I'm trying to upgrade the documentation of the plugins I'm maintaining to reStructuredText, and to publish the result on ReadTheDocs.
As several plugins are actually library plugins, I have many functions, commands, mappings, etc. to document. I see there exist Sphinx domains dedicated to Python, C++... but none for vim scripts.
Does anybody know whether something has been written to simplify the documentation of vim functions?
Subsidiary question: is anybody aware of a solution able to aggregate reStructuredText files into a vim-help-file? (with tags defined with stars and referenced with pipes, manual folds for sections, and so on)
Posted Oct 24, 2017, 11:10 AM UTC
Yes, https://github.com/google/vim-maktaba does this. Notice the docstrings on the functions:
https://github.com/google/vim-maktaba/blob/master/autoload/maktaba.vim#L78
They have some sort of generator for that, IIRC. Post an issue on their repo, they are very helpful.
Indeed, I found that (https://github.com/google/vimdoc), thanks. It only does half the job though: now I still need to find a way to generate .rst files from the same source as the one that can generate the vim help file.
Thanks.