Go to file
2023-12-30 20:02:30 -08:00
img Add site metadata 2021-12-14 18:24:30 -08:00
.gitignore Add site metadata 2021-12-14 18:24:30 -08:00
go.mod Update module name 2023-12-30 20:02:30 -08:00
go.sum Add modules, allow code blocks with spaces 2021-06-13 11:54:43 -07:00
LICENSE Move packages to foosoft.net 2022-07-03 21:02:28 -07:00
md2vim.go Move packages to foosoft.net 2022-07-03 21:02:28 -07:00
README.md Update README 2023-12-30 14:28:42 -08:00
vimdoc.go Move packages to foosoft.net 2022-07-03 21:02:28 -07:00


Writing technical documentation for Vim extensions is not exciting; manually converting what you've just written in Markdown to Vimdoc format is even less fun. I grew tired of having to do this repeatedly for my Vim-ArgWrap extension and finally formally solved this problem with a purpose-built tool. Maintainability, ease of use, and beautiful Vimdoc output were primary considerations in Md2Vim's design.

Markdown source file Vimdoc target file


Executing Md2Vim with the -help command line argument will trigger online help to be displayed. The list below provides a more detailed description of what the parameters do.

  • cols

    The number of columns used for laying out Vimdoc files to make them look as good as possible with your content. Notice that file contents will not be wrapped to this value; this is purely for such things as horizontal rule widths and help tag positioning. This defaults to 80, but that's a bit too narrow for some people.

  • desc

    Vim help files are supposed to start with the following two fields on the first line:

    filename.txt Description of this help file's contents

    The first field is the filename of the generated Vimdoc help file; the second is the description can you provide with this parameter.

    Multi line description can be written using \n.

  • norules

    By default, we generate horizontal rules above level 1-2 headings, as shown below:

    Level 1 Heading
    Level 2 Heading

    If you don't like the way it looks you can turn it off.

  • notoc

    If you don't wish to generate a table of contents you should set this flag to opt out. The table of contents lists all of the headings in the document and is always inserted before the beginning of document body.

  • pascal

    By default, all help tags get converted to lower case and space delimited words are joined with underscores.


    If you prefer the PascalCase way of doing things, set this flag and your output will look like this:

  • tabs

    If you don't like four space tabs for some reason you can change it to something else with this parameter.