vimgen is a vim inline generator and template expander. vimgen is a simple template system that works inside a VIM buffer. The input is a region of text. Everything until the first empty line in this region is considered the data section, everything below the first empty line is the template section
The data section of the input (everything until the first empty line) has to be a valid VIM dictionary. Newlines ("n") but no empty lines can be inserted for better readability (they are ignored). The data section is evaluated using VIM's eval function, hence it can include VIM functions, e.g. from the included range_date.vim. The template section of the input (everything below the first empty line) is the desired output (including newlines etc.) that has to be enriched/multiplied by the data using vimgen tags.
There are only three types of tags:
this tags loop over the variable 'var' which has to be a list. Inside the loop «var» references the element of the current iteration.
used inside a loop over 'var'. The test/tags that are surrounded
by this tag are ignored in the first iteration of the loop. This is useful for enumerations (see |vimgen-examples|)
this tag is replaced with the variable 'var', where 'var' either has only one value or the tag is surrounded by a loop iterating over 'var'. In case of nested dictionaries, a dot notation is used, e.g. a.b.c
This is a vimball, just edit vimgen.vba and source everything