Re: best library for data forms entry in vim

2020-11-19 Thread rwmit...@gmail.com
This discussion comes up repeatedly (so shows using the conversation search 
in google groups).

One suggestion was to use a split panel.  One panel would have user entered 
keywords and the other the combined document.  When saving the keywords, a 
script would auto run to do the substitutions and then load the results 
into the other panel. (well, that is how i interpreted the suggestion)

If your goal is to have them edit a document every 20 seconds, I really 
can't imagine they'll be doing a lot of editing other than filling in the 
required fields.

If you plan on having multiple templates, the problem gets more involved 
and so does the glue code to do the magic of manipulating fields to compute 
new fields/values.

Back in '88 I worked for a company that used something called Dataflex to 
generate input forms for phone support to use when responding to customers. 
 Ultimately you're probably looking at a custom solution.  It is amazing 
how something can look simple on the outset but quickly becomes much more 
involved.


On Thursday, November 19, 2020 at 5:53:41 PM UTC-5 ruben...@my.liu.edu 
wrote:

> On 11/19/20 1:08 PM, hor...@gmail.com wrote:
> > You know, the more I'm thinking about it, the more I think vim needs an
> > internal templating system. 
>
> no it doesn't, so don't thnink about it so much.
>
> vim is fine, if not already over built a little.
>
>
> -- 
> So many immigrant groups have swept through our town
> that Brooklyn, like Atlantis, reaches mythological
> proportions in the mind of the world - RI Safir 1998
> http://www.mrbrklyn.com
>
> DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
> http://www.nylxs.com - Leadership Development in Free Software
> http://www2.mrbrklyn.com/resources - Unpublished Archive
> http://www.coinhangout.com - coins!
> http://www.brooklyn-living.com
>
> Being so tracked is for FARM ANIMALS and and extermination camps,
> but incompatible with living as a free human being. -RI Safir 2013
>

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/51b96b05-f137-4579-bf1c-43311a62c794n%40googlegroups.com.


Re: best library for data forms entry in vim

2020-11-19 Thread Ruben Safir
On 11/19/20 1:08 PM, hor...@gmail.com wrote:
> You know, the more I'm thinking about it, the more I think vim needs an
> internal templating system. 

no it doesn't, so don't thnink about it so much.

vim is fine, if not already over built a little.


-- 
So many immigrant groups have swept through our town
that Brooklyn, like Atlantis, reaches mythological
proportions in the mind of the world - RI Safir 1998
http://www.mrbrklyn.com

DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive
http://www.coinhangout.com - coins!
http://www.brooklyn-living.com

Being so tracked is for FARM ANIMALS and and extermination camps,
but incompatible with living as a free human being. -RI Safir 2013

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/00c1c163-a617-22de-9ad6-8317d1834086%40my.liu.edu.


Re: best library for data forms entry in vim

2020-11-19 Thread hor...@gmail.com
You know, the more I'm thinking about it, the more I think vim needs an 
internal templating system. 

As it stands, I get how this is done in vim now - you use vimscript to 
create the template for you, in other words you need to program the look 
and feel. It has a lot in common with approaches like asciimatics in python 
(https://github.com/peterbrittain/asciimatics). 

This is IMO a lot more difficult than it need be. For example, leandro 
posted a todo application for me to see how its done 
(https://github.com/freitass/todo.txt-vim) and I looked at it - about 250 
lines of vimscript code to get the formatting where you can enter in todo 
lines. I'd rather have vim itself do the formatting for me, and just worry 
about the actual logic behind it. So that app would become

todo.tmpl


Todo

Done
Name
   Status
[[ {{ type=box, name=_donebox align=left }} {{ type=string[35], name = 
_task, align=left, color=red }} {{type=string[35], name=_status, align=left 
}} ]]



where you could define the elements you want in your application inline and 
attach pieces of code to them to do any variable manipulation. Arrays of 
lines could be designated by  [[.   ]],  Any user input could directly map 
onto python or perl in the form of python/perl arrays, or perhaps arrays of 
hashes - and each element would have its own coderef associated with it if 
you needed to process the output in any way.

I've mocked this up by making vim separately called from perl, memoizing 
all the variables that are defined in the template, and then responding to 
user input by hack - the user needs to close the actual vim session in 
order for perl to actually do the recalculation and realignment. This works 
(after a fashion) but it really is a hack and wouldn't be usable for what i 
want to do. But i'm hoping that perhaps a templating system could make its 
way into a newer version of vim.

On Thursday, November 19, 2020 at 3:30:17 AM UTC-6 Shlomi Fish wrote:

> Hi Gabriele,
>
> On Wed, 18 Nov 2020 09:36:30 +0100
> Gabriele  wrote:
>
> > On 18/11/2020 9.14, Shlomi Fish wrote:
> > > I can recommend *against* using m4, which although part of the POSIX
> > > standard, is limited and vile in both syntax and behaviour. I have a 
> page
> > > on my site with a roundup of similar text-processing tools and links
> > > including preprocessors, and template systems:
> > >
> > > 
> https://www.shlomifish.org/open-source/resources/text-processing-tools/ 
> > 
> > Well as we're at it I can strongly recommend against GPP, which I see 
> > listed first on that page.
> > 
> > I haven't had experience with the linked logological.org version 
> though, 
> > it's not entirely impossible that they improved it a lot.
> > 
>
> Thanks for the information. I should also note that the distinction between
> template systems and preprocessors is often blurred, similarly to the
> distinction between text editors and IDEs. I used to list m4 first in that
> section, but someone thought I somehow recommend or endorse it due to that.
>
> > Of course this has still nothing to do with what the thread author wanted
> > 
>
> Right, I've only replied due to
> https://explainxkcd.com/wiki/index.php/386:_Duty_Calls .
>
>
> -- 
>
> Shlomi Fish https://www.shlomifish.org/
> https://youtu.be/GoEn1YfYTBM - Tiffany Alvord - “Fall Together”
>
> Every successful open source project will eventually spawn a sub‐project.
> — https://www.shlomifish.org/humour/fortunes/osp_rules.html
>
> Please reply to list if it's a mailing list post - https://shlom.in/reply 
> .
>

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/153a5cd7-e7af-4547-8a97-80ea57a3a00cn%40googlegroups.com.


Re: best library for data forms entry in vim

2020-11-19 Thread Shlomi Fish
Hi Gabriele,

On Wed, 18 Nov 2020 09:36:30 +0100
Gabriele  wrote:

> On 18/11/2020 9.14, Shlomi Fish wrote:
> > I can recommend *against* using m4, which although part of the POSIX
> > standard, is limited and vile in both syntax and behaviour. I have a page
> > on my site with a roundup of similar text-processing tools and links
> > including preprocessors, and template systems:
> >
> > https://www.shlomifish.org/open-source/resources/text-processing-tools/  
> 
> Well as we're at it I can strongly recommend against GPP, which I see 
> listed first on that page.
> 
> I haven't had experience with the linked logological.org version though, 
> it's not entirely impossible that they improved it a lot.
> 

Thanks for the information. I should also note that the distinction between
template systems and preprocessors is often blurred, similarly to the
distinction between text editors and IDEs. I used to list m4 first in that
section, but someone thought I somehow recommend or endorse it due to that.

> Of course this has still nothing to do with what the thread author wanted
> 

Right, I've only replied due to
https://explainxkcd.com/wiki/index.php/386:_Duty_Calls .


-- 

Shlomi Fish   https://www.shlomifish.org/
https://youtu.be/GoEn1YfYTBM - Tiffany Alvord - “Fall Together”

Every successful open source project will eventually spawn a sub‐project.
— https://www.shlomifish.org/humour/fortunes/osp_rules.html

Please reply to list if it's a mailing list post - https://shlom.in/reply .

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/20201119112958.0671447b%40telaviv1.shlomifish.org.