Weird problem with vi... "Not that many lines in buffer"

Swan woods at ihlpe.ATT.COM
Tue Sep 27 08:44:34 AEST 1988


In article <508 at icus.islp.ny.us> lenny at icus.islp.ny.us (Lenny Tropiano) writes:
>I just created this .signature file, and for some reason every time this
>is in a file, and I do a "vi" of that file I get the following message...
>
>".signature" 4 lines of 300 characters Not that many lines in buffer
>
>I've tried all kinds of things to alliviate this, I retyped the file 
>(verbatim) and it still came back... I guess it doesn't like my .signature :-(
>If you save this message (or try to reply to it) and vi is your editor, it
>should crop up (at least on the UNIX PC).  Is something wrong with my
>editor, should I reinstall the ENHANCED EDITORS?
>
>-Lenny
>-- 
>Lenny Tropiano             ICUS Software Systems         w: +1 (516) 582-5525
>lenny at icus.islp.ny.us      Telex: 154232428 ICUS         h: +1 (516) 968-8576
>{talcott,boulder,hombre,pacbell,sbcs}!icus!lenny         attmail!icus!lenny
>        ICUS Software Systems -- PO Box 1; Islip Terrace, NY  11752


Yes, I got the same response too.  The cause of it is an undocumented feature
of ex/vi that you are inadvertantly using but didn't know you were.

When vi starts to edit a file, it looks in the first 4 lines and the last 4
lines of that file for either vi: (that's vi followed by a colon), or
ex: (I'm trying to be careful I don't do the same thing!).  If later on the
same line there is another colon (:), vi assumes that the stuff between the
first part (ex colon or vi colon) and the later colon are some ex-mode commands
to do some set up, such as "ex: set showmatching :", which, if it were in the
first 4 lines or last 4 lines of this file, would automatically turn on the
showmatching mode of vi.

Now, go back and look at your signature line that starts: lenny at icus.islp...
Your Telex number is trying to tell vi (due to the later h:) to go to line
154232428 (and perform the "ICUS     h" command on it even)!!  Whoops!

Perhaps you could slip a . in after the Telex, as in: Telex.: 154...

Hope this helps.

Warren D. Swan  (WooDS)     Y n n ____  __
AT&T Bell Laboratories     -(((((([__]_)__]
Naperville, Illinois       /o-O-O-O oo  oo
ihlpe!woods             #####################



More information about the Comp.unix.wizards mailing list