Aaron Sloman wrote:
> Chris Glur eas-lab@absamail.co.za writes:
>
> [CG]
>> > >> > I don't even KNOW about <completion>.
>> > >>
[Chris Dollin]
>> > >> It's whatever you have to type to do completion in the editor. I
>> > >> don't have it, but it would be easy to implement in ved (pick a
>> > >> boring key sequence, bind it to a function that looks left for a
>> > >> word, looks it up in a completion table, and fills in the found
>> > >> template.)
>> > >>
[CG]
>> > > Yes I know WHAT completion means; just not that it's available for
>> > > poplog ? If I've missed the availability of 'completion' for ved,
>> > > imagine what else I've missed !
>> >
[CD]
>> > Of *course* it's "available"; you can extend Ved with user-defined
>> > code. If you want it, you can have it.
>
> It's not as trivial as you might think to produce a nice user interface.
>
> Finding all the words in the current dictionary that start with a given
> string is dead easy, using appdic or mapdic. E.g.
[deletions]
That wasn't what I meant by "completion"; the name was not as well-chosen
as I'd prefer. I had in mind more
if ESC-Y
completing to
if <cursor ends up here> then else endif
Ditto "until ESC-Y" completing to
until <cursor ends up here> do enduntil
where ESC-Y consults a ESC-Y-specific table of completions. To make
this work properly one also needs at least (using SPOO to mean "some
ESC-thingy or CTRL-thongy or whatever prefix" and A, B etc to mean
"some specific extension for SPOO")
SPOO-N next slot in current completable thing
SPOO-P previous slot in current completable thing
SPOO-E just after the end of current completable thing
SPOO-B just before the beginning of current completable thing
SPOO-D delete the current slot in the current completable thing
SPOO-K kill the entire current completable thing
SPOO-X extend the current completable thing
[add else/elseif to if, times to repeat, etc]
SPOO-C complement the current thing [if <-> unless, etc]
But we'd have to try it to see if it would fly in practice.
--
Chris "electric hedgehog" Dollin
C FAQs at: http://www.faqs.org/faqs/by-newsgroup/comp/comp.lang.c.html
C welcome: http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html
|