kaz@cadovax.UUCP (Kerry Zimmerman) (01/24/89)
[ an extra line a day keeps the line-eater away ] I recently purchased Cygnus Professional to have another "ARexxable" program. My fingers are so used to 'vi' that I decided to program a series of macros to allow a 'vi'-like interface to CED. I realize that this is not totally possible because the normal keyboard keys without ctrl or alt cannot be used as the first character of a CED macro. But, I thought I would use a control key for the first character of a 'vi' sequence. For example, "ctrl-d w" for vi's "dw" (delete word) command. Anyway, I decided this project would make an interesting ARexx script. I could just use something like the following for each macro I wanted. address 'rexx_ced' /* dw to delete a word */ 'beg/end definition' text 'ctrl-d y w n' 'delete word' 'beg/end definition' /* d$ to delete to EOL */ 'beg/end definition' text 'ctrl-d y $ n' 'delete to EOL' 'beg/end definition' ... ... etc The resulting ARexx script would create my macros, and also serve as documentation for the macros. Bottom line is I can't make it work. As soon as CED sees the 'beg/end definition' it stops and waits for me to enter the first key of the macro rather than taking it from my ARexx script. I tried all kinds of things to make CED see the characters following the 'beg/end definition', but nothing worked. Does anyone see how I can make this work? If the above cannot be done, I thought of another solution. I could write an ARexx script to generate a macro file, just like the file created by CED after doing a 'save definitions'. Problem here is trying to reverse engineer the macro file. If anyone can tell me the format of a macro file, I would be very appreciative. I plan on creating a program to list each defined macro. Maybe a macro editor too. These would be neat utilities. I had a similar problem with a short ARexx script that I wanted to set a new 'set timer' value with. CED would not take the timer value from the script, but instead would stop and wait for me to enter a timer value. How can I make this work? Thanks in advance for anyone's help. Kerry Zimmerman # {ucbvax,decvax}!trwrb!cadovax!kaz VERSYSS Corporation 213-323-8170 A difference between an amateur and a professional, is that a professional has the right tools.
rokicki@polya.Stanford.EDU (Tomas G. Rokicki) (01/25/89)
> I recently purchased Cygnus Professional to have another "ARexxable" > program. My fingers are so used to 'vi' that I decided to program a series > of macros to allow a 'vi'-like interface to CED. Gonna be too slow to be really useable, probably. Gotta get ARexx to be faster. Bill?
ejkst@cisunx.UUCP (Eric J. Kennedy) (01/25/89)
In article <2323@cadovax.UUCP> kaz@cadovax.UUCP (Kerry Zimmerman) writes: >I recently purchased Cygnus Professional to have another "ARexxable" >program. My fingers are so used to 'vi' that I decided to program a series >of macros to allow a 'vi'-like interface to CED. I realize that this is >not totally possible because the normal keyboard keys without ctrl or alt >cannot be used as the first character of a CED macro. Well, it's too bad that CED doesn't let you do this. But if you want to have a powerful, ARexx capable editor that mimicks vi, I've written a vi emulator for the Uedit text editor. Uedit lets you assign commands to any key, regardless of whether or not it happens to be an unshifted (or control or alt...) letter. Except for some of the more complex EX commands, it is a fairly complete vi emulator, and includes undo, redo, marks, buffers, ctags, and delete buffers. I'm currently in the process of updating the vi config to the latest version of Uedit. Send me email if you're interested, and I'll let you know when it's ready. I can even send it to Bob Page, since there are so many UN*X users out there who are liable to be in the same boat. BTW, although Uedit does have an ARexx port, the vi configuration doesn't require it. It would be too slow to try to do all that stuff via ARexx, so it uses Uedit's internal programming language exclusively. -- Eric Kennedy ejkst@cisunx.UUCP
kaz@cadovax.UUCP (Kerry Zimmerman) (01/26/89)
In article <6323@polya.Stanford.EDU> rokicki@polya.Stanford.EDU (Tomas G. Rokicki) writes: >> I recently purchased Cygnus Professional to have another "ARexxable" >> program. My fingers are so used to 'vi' that I decided to program a series >> of macros to allow a 'vi'-like interface to CED. > >Gonna be too slow to be really useable, probably. Gotta get >ARexx to be faster. Bill? You missed the point, Tom. ARexx will be used to program my CED macros in one batch, all at once. CED will then run the macros, not ARexx. Therefore,the speed of ARexx will not be a problem. Kerry Zimmerman # {ucbvax,decvax}!trwrb!cadovax!kaz VERSYSS Corporation 213-323-8170 A difference between an amateur and a professional, is that a professional has the right tools.
rokicki@polya.Stanford.EDU (Tomas G. Rokicki) (01/27/89)
> You missed the point, Tom. ARexx will be used to program my CED macros > in one batch, all at once. CED will then run the macros, not ARexx. > Therefore,the speed of ARexx will not be a problem. Sorry, I was confused. I fired up CED again last night and was playing with it; it's really quite nice. But somehow, every time I use the `assign function key to ARexx macro or DOS command' function, my machine gurus, sometimes spectacularly. I need to call ASDG about this . . . -tom
perry@madnix.UUCP (Perry Kivolowitz) (01/30/89)
The difficulty in doing a full vi macro package is not that CEDPro limits macro bindings to keys that don't have other HARD bindings. The difficulty is that VI is a modal editor whereas CEDPro is not. It is difficult for any amodal editor (such as EMACS) to emulate fully an editor in which distinct modes exist. Concerning the key binding limitation on CEDPro: It is quite likely that this restriction will be removed in the next release of the editor. The limitation was a design decision based on personal pref- erences of the author, not based upon technical issues. Since there is a publicly stated distaste for this limitation, it will disappear. Concerning macro file structure: As has been requested here, we will publish the file structure of the macro files and look forward to your use of this information to create a more convenient method for macro manipulation. Perry -- Perry Kivolowitz, ASDG Inc. ARPA: madnix!perry@cs.wisc.edu {uunet|ncoast}!marque! UUCP: {harvard|rutgers|ucbvax}!uwvax!astroatc!nicmad!madnix!perry
shadow@pawl.rpi.edu (Deven T. Corzine) (01/30/89)
Difficult, but not impossible; I've seen at least 2 vi-modes for Emacs. But then, Emacs IS somewhat more than an edior. Deven -- ------- shadow@pawl.rpi.edu ------- Deven Thomas Corzine --------------------- Cogito shadow@acm.rpi.edu 2346 15th Street Pi-Rho America ergo userfxb6@rpitsmts.bitnet Troy, NY 12180-2306 (518) 272-5847 sum... In the immortal words of Socrates: "I drank what?" ...I think.