BPJ,
Thanks for the feedback and idea, and i'll check out your tool. You know, that's my fallback plan, to script it up and do substitutions based off of user input if necessary. I've done something very similar before, and its workable.
But I submit to you that being able to do it via an editor would be an order of magnitude more scalable and usable. You could put in helpful keybindings to speed up data processing, use certain keys to calculate derivative windows to help users evaluate their input, and use the editor within a script to present multiple cases to end users for them to process one after another.
My goal was to have users take about 20 seconds per use case with the help of scripting, in-vim macros, and vim's very useful perl and python bindings. It would reduce error rates as well.
If you had a clean Implementation for this, you could make vim the center for a whole new class of applications based off of data processing. Again, think excel for unix.
In any case, if I was going to provide low-level support for this in vim itself, I'd make it so that there was a file of type template, where:
1. the state of the default text of the file could be tagged as uneditable - ie: the vim cursor could only edit certain parts of the file based on tags given by the user. All vim keys would 'skip over these uneditable parts and go directly to the next user entry portion
2. the default state of the file would be insert mode, with helpful key macros to go to the next line.
3. The editable parts would have callbacks associated with them. Each callback could be then specified in the file in the form of a python or perl piece of code which either would set input or calculate input.
So my original example would look something like this. Each time a user would enter in value, the callbacks would be re-executed and any updates would be made to the script. If a value is undef, it would show up as a red piece of text.
I maintain that this would be very powerful. My personal application is making training cases for a nn, but I could see all sorts of applications for it.
Ed
Dear <<<person>>>>
We received your order for <<<name>>>, price <<<price>>>, quantity <<<quantity>>>, total <<<total>>>
Please look over the above information to make sure that this is correct.
<<<email>>>
__CODE__
{
'person' => sub { $person = $_[0] },
'name' => sub { $name = $_[0] },
'price'. => sub { $price = $_[0] },
'quantity' => sub { $quantity = $_[0] },
'total'. => sub { $total = $price * $quantity }
'email' => sub { if (($_[0]) && _is_email($_[0])) { _mailit( $_[0], $text) }