Sunday, June 5, 2011

Re: non-interactive vimdiff to stdout

Reply to message «Re: non-interactive vimdiff to stdout»,
sent 06:38:10 05 June 2011, Sunday
by Ben Fritz:

> What's the extra span for, with class=over? I could not figure out a
> purpose for it.
It was removed in rev 232:d5f6156d14e4. Initially it was for making input
unselectable in opera, but in original article it was
<input... /><span ... />
where constant width is set both for input and for span. I tried replacing it
with <span ...><input ... /></span>, but this does not work. I can't use initial
construct as it requires to specify width.

> By the way, I looked at the specific link you gave...how do you unfold
> the text? Or is this an example of one which cannot be unfolded? I
> know I read that your plugin supports this.
I do not unfold text by default. There is IgnoreFolds option which makes
formatvim ignore folds and AllFolds option that creates something like
http://formatvim.sourceforge.net/folded.yaml_C0-D0-a1-n0-o3-r1.html
(-a1 stands for AllFolds: 1). I guess I will do something with the latter.

> I'm not sure if you care, but the text is still selectable in Opera,
> which doesn't seem to support the user-select property.
I care (I use choose opera as my browser), but I am fine with current partially
working solution that requires user not to start selecting text from <input>.

Original message:
> On Jun 3, 9:14 am, ZyX <zyx....@gmail.com> wrote:
> > Reply to message «Re: non-interactive vimdiff to stdout»,
> > sent 09:13:30 03 June 2011, Friday
> > by ZyX:
> >
> > If you are interested, <input> hack is now implemented in frawor-port
> > branch:http://formatvim.hg.sourceforge.net/hgweb/formatvim/formatvim/fil
> > e/fr.... Lots of examples are in *.ok files in directory «test/» (you
> > should see those that have -r1, -n1 or -oN where N>=1).
> > Live examples have urls
> > likehttp://formatvim.sourceforge.net/concealed.tex_C0-D0-F0-L0-c0-l_q_q-
> > n... (created using
> > zmv -C '(*).ok'
> > 'outs/${${${${${1//_/__}//\%/_}//$/_d}//!/_b}//>/_g}.html' scp
> > outs/*.html \
> >
> > zyxsf,format...@frs.sourceforge.net:/home/groups/f/fo/formatvim/htdocs
> >
> > : here following replacement are done:
> > _ -> __, % -> _, $ -> _d, ! -> _b, > -> _g).
> > It is not guaranteed that live examples were created using latest
> > revision.
>
> I've actually been playing around with some prototyping for this as
> well.
>
> What's the extra span for, with class=over? I could not figure out a
> purpose for it.
>
> I'm not 100% sure I'm going to implement this fully. The non-copyable
> area is easy to accomplish with the input with readonly attribute set.
> But the unselectable quality depends an IE-proprietary attribute
> (unselectable) or on experimental CSS3 properties which if I am not
> mistaken have been removed from the latest working draft. If someone
> can point to a recent CSS3 draft with the user-select property
> defined, I'd be happy to be proven wrong...
>
> I am thinking that I will probably implement the non-copyable bit, but
> I'm really not sure I can justify to myself the invalid markup
> required for the unselectable portion. Any thoughts? I would really
> like to have an unselectable, uncopyable region for the line numbers
> and fold column.
>
> By the way, I looked at the specific link you gave...how do you unfold
> the text? Or is this an example of one which cannot be unfolded? I
> know I read that your plugin supports this.
>
> I'm not sure if you care, but the text is still selectable in Opera,
> which doesn't seem to support the user-select property.

No comments: