Wide-screen editing on the Unix-pc

C. Jeffery Small jeff at cjsa.WA.COM
Wed Oct 19 02:41:27 AEST 1988


This is a followup to my previous posting asking for assistance in getting
a wide (greater than 80 column) vi editing session to work in the Unix-pc
console.

Thanks go to Andy Fyfe (andy at csvax.caltech.edu) who pointed out that the
cursor motion entry in the termcaps file was hard coded for two-digit
strings and breaks as soon as you try to move past column 99.  When this
is corrected, everything works just fine.

Below, I summarizing what needs to be done to edit with the 120-column font,
for anyone else who wants to set this up.  If you want to use another font,
make the obvious adjustments in the following procedure.  The least obvious
thing you need to check is how many lines you get with the alternate font.
If the font doesn't divide evenly across the screen, you end up with some
strange behavior (which could probably be addressed by creating a new window
height with windy which just fits the font.  However, I haven't tried this yet.)

Step 1:	Edit /etc/termcaps.  Make a copy of the s4 entry and edit it as follows:

	- Modify the names by tacking on a '-120' as in:

		   s4-120|PC7300-120|unixpc-120|pc7300-120|3b1-120|Safari 4-120:

	- Change   co#80	   to   co#120
	- Change   li#24	   to   li#26
	- Change   cm\E[%i%2;%2H   to   cm\E[%i%d;%dH

	(If you have curses applications, you might want to create a
	 corresponding s4-120 terminfo entry with the same modifications)

Step 2:	In your private (or public) bin, put the following file named:  vi-120

		TERM=s4-120
		export TERM
		setf  /usr/lib/wfont/PLAIN.R.E.11.A  0
		/usr/bin/vi  $*

Step 3:	Add the following alias to .kshrc

		alias wvi='windy -b -n "wvi:  $1"  vi-120'

	(Windy starts up a background window using the vi-120 script which
	 load the appropriate font into slot 0 and then fires up vi.  When
	 you exit vi, the new window is knocked down and you are left in 
	 your original window with the default system font.)

To do a wide edit on one or more files, type:   wvi  filename [ ... ]
--
Jeffery Small    (206) 485-5596            uw-beaver!uw-nsr!uw-warp
C. Jeffery Small and Associates                                    !cjsa!jeff
19112 152nd Ave NE - Woodinville, WA  98072           uunet!nwnexus



More information about the Unix-pc.general mailing list