vimgen 0.1

vimgen is a vim inline generator and template expander.
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:

«-var»...«-»
this tags loop over the variable 'var' which has to be a list. Inside the loop «var» references the element of the current iteration.

«!var»...«-»
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|)

«var»
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

Requirements:

· Vim

INSTALLATION:

This is a vimball, just edit vimgen.vba and source everything
:so %

last updated on:
April 4th, 2008, 17:07 GMT
price:
FREE!
developed by:
Bastian Mathes
homepage:
www.vim.org
license type:
GPL (GNU General Public License) 
category:
ROOT \ Utilities
vimgen
Download Button

In a hurry? Add it to your Download Basket!

user rating 16

3.0/5
 

0/5

Rate it!

Add your review!

SUBMIT