RE: [gtk-list] Re: vi bindings for text widgets



If anyone actually does this, it should be included in gtktext.c and just have
the option of turning the bindings on and off - the default being off of
course, so as not to force the bindings on anyone... I for one use vi a good
deal, and sometimes when switching back to a text editor without those bindings,
like gEdit (shameless plug :-) start hitting 'dd' or 'x' instead of doing it the
normal way with the delete key, and whatever that keybinding is that deletes the
entire line.. Anyways, my suggestion for how to do the bindings would be to have
a label and entry widget packed in below the text widget - hidden when not in vi
mode - and then have hooks that the program could connect functions to for
handling the commands that are entered in the entry widget, such as :wq, :q!,
and the / and ?'s... Don't know how easy this would be to implement, just my
thoughts on the subject..

On 04-Jul-98 Erik Greenwald wrote:
> matt wrote:
> 
>> what is the possiblity of someone hacking in
>> vi bindings into the text and text entry widgets?
>>
>> i have a few ideas about how it should work.
>>
>> anyone think this would be a good idea?
>>
>> any pointers?
>>
>> --mat
> 
> I'd think that most people looking for an easy text editing window wouldn't
> want to be bothered with learning vi command stuff... My take on who gtk+ is
> aimed for 2 groups, ppl who know their $h|t and just want an easier
> interface,
> and ppl who are new to linux who don't know, but want something brainlessly
> easy like windows and macos. The ppl who know their stuff in my experience
> have no problem using text editors... I have all sorts of X editors, but
> still
> prefer text based ones (joe and vi) and will use them. I don't think adding
> binding to the X editor will make me want to use it. However, joe blow who
> just installed linux and wearing their newbie tshirt will probly have
> problems
> with all these different bindings, because they're used to the m$ way... I
> d'no if there's inheritance on the text widget, but even if there isn't, you
> could copy the gtktext.h file to like gtkvitext.h and include it in your
> source? this way you could include vi style handling with your app, but not
> changing the widget set to something most ppl probly won't use and most end
> users won't appreciate? just my take :)
>     -Erik <br0ke@shells.clipboard.com>
>         http://shells.clipboard.com/~br0ke
> 
> 
> -- 
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null

--
Evan Lawrence



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