[comp.unix.questions] Wrapmargin in \"vi\" question

iunix1@almsa-1.arpa (Will Martin) (09/22/88)

Please respond to this by mail, as the USENET > ARPANET gateway for 
this list has been down for weeks, and I cannot see anything posted
to the USENET newsgroup.

I'm one of the user-assistance people at this activity, and just ran
into an odd situation that I can't figure out from reading the manual.
One of our users insists that he had an arrangement whereby he had
the "wrapmargin" feature of "vi" turned on so that it did the line 
break at column 80. This now has vanished when some Oracle-specific
stuff in his .profile file was removed. 

I cannot figure out how he ever had this, nor how to provide this
to him. Giving him a wrapmargin at column 79 is easy -- all I have
to do is a ":set wm=1" inside "vi" or have an EXINIT setting in the
.profile file of:
EXINIT='set wm=1'
export EXINIT
(I do this myself with "8" to get a column-72 wrapmargin.)

But setting wm=0 doesn't give you the same thing at column 80; the zero setting
turns off the option, both by trial and according to the reference to this
option in the "Ex Reference Manual, Version 3.1 to 3.5 Update". This manual
points to the "Intro to Display Edition With Vi" manual for more info, but
there is only a brief paragraph mentioning this in 6.5 "Continuous text input".

The "vi" running on this system is "Version 3.9, 2/9/83". It may be that I
am looking at inappropriate documentation; this is being run on a Sys V
Sperry/Unisys system, but I'm looking at the "vi" and "ex" manuals that
came with our 4.2 BSD from UCB, and which have a 16 September 1980 date.

I also looked at copies of the 4.3 BSD "vi" and "ex" manuals, which have
no dates on them (those versions are from Mt. Xinu), and the relevant
sections appear to be the same as in 4.2 BSD. The Sperry man page on
"vi" points to a mysterious "Editing Guide" document which no one here
has ever seen, and which never showed up in amongst the boxes of
documentation that came with our Sperry/Unisys systems.

(I think the above will show that I did "RTFM", to deter flames on that
score. Asking the net/list is about the only other option...)

I did try wm=80 and wm=81 and similar experiments; they don't work, and
indicate that the system thinks your right margin begins at your left
margin, so that's not the way around it. "wm=-1" gets an error as
non-numeric. I ask the net for advice as to what might work.

Will Martin
iunix1@almsa-1.arpa

sanford%ssurf@ucsd.edu (09/23/88)

Date:         Wed, 21 Sep 88 13:25:16 CDT
Reply-To: INFO-UNIX@BRL.ARPA
Sender: I-UNIX%TCSVM.BITNET@Sds.Sdsc.Edu
From: iunix1@ALMSA-1.ARPA
Subject:      Wrapmargin in "vi" question
Comments: To: info-unix@BRL.MIL
To: sanford%ssurf%ucsd.edu@Sds.Sdsc.Edu

Please respond to this by mail, as the USENET > ARPANET gateway for
this list has been down for weeks, and I cannot see anything posted
to the USENET newsgroup.
     
I'm one of the user-assistance people at this activity, and just ran
into an odd situation that I can't figure out from reading the manual.
One of our users insists that he had an arrangement whereby he had
the "wrapmargin" feature of "vi" turned on so that it did the line
break at column 80. This now has vanished when some Oracle-specific
stuff in his .profile file was removed.
---
there is more here, but i did not include it
------
Will Martin
iunix1@almsa-1.arpa
________________________________________________________________________
Hi Will,
     I did some experiments and it looks as if you change the co# command in
the termcap file from co#80 to co#81 and then say set wm=1, it wraps on 80.
The person answering this question may have had his own termcap that had this
defined some other place.  I did this on my sysV machine and it seemed to fix
it.  This is the only thing that I can think of.
				   Hope that helps,
				   Mike

______________________________________________________________________________
Name:				Mike Sanford
University:			Scripps Institution of Oceanography, U.C.S.D.
Telephone:			(619) 534-4870
US MAIL				A-030-SSURF
				La Jolla, CA 92093   USA
______________________________________________________________________________
E-Mail:				Internet:    sanford@ssurf.ucsd.edu
				BITnet:      msanford@ucsd.bitnet
				UUCP:        ...!ucsd!ssurf!sanford
				SPAN/DECnet: SSURF::SANFORD
				SDSCnet:     sanford@sio.SDSCNET
 _______________________________________________________________________________
 Computers:
     Home:                      Atari 400,800,600xl,800xl,130xe (I like Atari)
                                HP 150, NEC  8201
     Office:                    DEC VAX/VMS, AT&T, Alliant, Cray, IBM PC/XT/AT
                                

David_Wurz.ESXC15@xerox.com (09/24/88)

wm=80      wordwrap at column 80