[comp.sys.ibm.pc] How to avoid the vi editor

bob@imspw6.UUCP (Bob Burch) (07/03/88)

From Ted Holden at HTE:




This article applies to situations in which PCs or clones are
being used as terminals to a UNIX system, a situation which I assume
is common and getting commoner, especially at govt. installations.
The three sections of code included here are Procomm+ scripts which
automatically haul a file down to the PC using Kermit, Xmodem, or 
Chuck Forsberg's Zmodem (sz/rz/dsz), load it into a good quality PC
text editor (here, Sammy Mitchell's Qedit, although other users may
have other choices), and, upon exiting the editor, automatically copy
the file back to the UNIX system.  Previous versions of the file on the
PC are dumped off to a backup directory (bin) aforehand.

    This achieves three purposes, all of which are laudible.
It provides a painless and automatic scheme for backing up code between
the PC and the UNIX system.  It takes a load off of the UNIX system
(picture 6 people doing Ada or Cobol compiles AND another 13 people
using VI on the same little Arrete or whatever?).  And, finally, it 
avoids VI.  VI was neat back in the seventies when it came out but,
having gotten used to PC text editors, I find VI painful to use under the
best of circumstances;  under the worst of circumstances i.e. using 
Procomm or whatever in VT100 mode, VI can be exceedingly obnoxious,
switching from edit to input mode at ITS discression, not the user's
every 10 keystrokes etc. etc.

...............................................................



message "file to edit: ";
get s0;
set sound off;
strcpy s1 "copy ";
strcat s1 s0;
strcat s1 " bin";
dos s1;
strcpy s1 "del ";
strcat s1 s0;
dos s1;
set sound on;

transmit "wermit -s ";
transmit s0;
TRANSMIT "^M";

getfile kermit s0;

strcpy s1 "q ";
strcat s1 s0;
dos s1;

strcpy s3 "wermit -r  ";
transmit s3;
TRANSMIT "^M";

sendfile kermit s0;



.........................................



message "file to edit: ";
get s0;
strcpy s1 "copy ";
strcat s1 s0;
strcat s1 " bin";
dos s1;
strcpy s1 "del ";
strcat s1 s0;
dos s1;

transmit "xm -st ";
transmit s0;
TRANSMIT "^M";
pause 3;

getfile xmodem s0;

strcpy s1 "q ";
strcat s1 s0;
dos s1;

transmit "xm -rt ";
transmit s0;
TRANSMIT "^M";

pause 3;

sendfile xmodem s0;


........................................



message "file to edit: ";
get s0;
strcpy s1 "copy ";
strcat s1 s0;
strcat s1 " bin";
dos s1;
strcpy s1 "del ";
strcat s1 s0;
dos s1;

transmit "sz ";
transmit s0;
TRANSMIT "^M";
pause 2;

strcpy s1 "dsz port 2 speed 9600 rz ";
strcat s1 s0;

dos  s1;

strcpy s1 "q ";
strcat s1 s0;
dos s1;

transmit "rz -ya";
TRANSMIT "^M";

pause 2;

strcpy s1 "dsz port 2 speed 9600 sz ";
strcat s1 s0;
dos s1;
break;