Tuesday, November 24, 2020

Re: best library for data forms entry in vim


Look -  if it comes up repeatedly in conversations, then hey, you know there just MIGHT be something there?

I'd argue it this way - the goal of an editor is to be able for users to edit documents, right? That's the verbatim definition of an editor. 

Now, there is a large class of documents that vim is NOT suited for - and that is structured documents, consisting of data fields. And unfortunately for vim, that is a huge portion of the data-entering world, and is getting larger by the day. And there is no good unix program for handling it.

So you have a large, unfilled use case here - where your goal is to not worry about the formatting, the editing, the keybindings - or anything associated with an editor - and where you want to only worry about the data and can manipulate that data via callbacks.

And yes, you are right, since vim didn't have something like this I ended up writing a custom solution. It sucks. I wrote it in 1500 lines of python using asciimatics when I could have done it within say 50 lines of python with a decent templating system and vim. Again, it royally sucks. 

I took about 3 days to write it when it could have taken - again - about 1 hour or so with a decent templating system. And more to the point it looks less professional than it would have in vim. It doesn't leverage the large code base and I have to train people to use the arbitrary keybindings.

So yeah,  I definitely say that there is a use case for it here and if there are multiple conversations about it that come up from time to time I'd say that this just makes my point for me.

Ed


On Thursday, November 19, 2020 at 7:20:46 PM UTC-6 rwmit...@gmail.com wrote:
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/0da9febc-3d40-4ed0-8623-5e87761bd149n%40googlegroups.com.

No comments:

Post a Comment