Re: [gtk-list] Re: New key-binding system



On Thu, Jul 09, 1998 at 07:04:21PM -0400, Owen Taylor wrote:
> But, we have just agreed, right, that without making the
> bindings language a "real" language - we need to modify
> the widgets to support the concept of VI bindings, there
> is no way around it.
> 
> [ I'll refrain making any implications about the what
>   this implies about the wisdom of stateful key-bindings
>   in the first place ]

one other thing that I just thought of ... I dunno how emacs does
things ... but is there such a thing where you do an action and
motion and it's considered one action? .. plus there is a count
sometimes ... this could be done by putting all the strings in the
bindings ... but that would be ugly ... (this is how I did it
when I wanted a simple vi mode) ... it gets quite large ...
anyway ... if the bindings have to be completely atomic this is
the way they need to be done ... but if you nind an action ...

this could be done with selection too, but there would need to be
at least some state information again ... one way to do this would
be to use yaf (yet another flag) to keep track of the last edit
command ... and yaf to keep count ...

hmmm that is getting a bit on the larger side ... but it shouldn't
actually be that large in code I think ... the bindings would still
be done in the .rc file not in the source ...

or it could just be done with putting the simple atomic sequences
as separate bindings ... this would add no C code except for 
the command/insert mode info ...

but this is quite a lot of bindings ... the count can be in different
places and I guess we should support say up to 9 counts ... so if
we have 3 commands d,y,c ... and say 10 motion commands we have

3*10*9*2

combinations ... which is 540 .... (and I forgot r command which would
add 26 ....) ...

the strength of vi that you don't have to remember a lot of stuff
suddenly becomes a weakness if you need atomic bindings ... :)

implementing some more state info in C (which shouldn't take up all that
much code) would make this much simpler ... plus if there are any other
bindings which are not atomic (does emacs have non atomic bindings?)
... it can be used for those as well ... I'm not saying implement the
bindings in C ... but just enough to make the bindings simple

George

-- 
------------------------------------------------------------------------------
George Lebl <jirka@5z.com> http://www.5z.com/jirka/
------------------------------------------------------------------------------
  The following implements RSA in perl and is illegal to export from the US:

          #!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
          $/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
          lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]