Xref: utzoo comp.sys.att:4344 comp.unix.wizards:11361 Path: utzoo!attcan!uunet!super!udel!gatech!bloom-beacon!bu-cs!encore!boykin From: boykin@encore.UUCP (Joe Boykin) Newsgroups: comp.sys.att,comp.unix.wizards Subject: Re: Weird problem with vi... "Not that many lines in buffer" Summary: Not a bug, but a "feature" Keywords: vi, bug Message-ID: <3732@encore.UUCP> Date: 26 Sep 88 15:19:37 GMT References: <508@icus.islp.ny.us> Sender: uucp@super.ORG Followup-To: comp.sys.att Organization: Encore Computer Corp, Marlboro, MA Lines: 55 In article <508@icus.islp.ny.us>, lenny@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... ... >-- >Lenny Tropiano ICUS Software Systems w: +1 (516) 582-5525 >lenny@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 The "problem" is that the "modeline" feature of VI is getting in your way. If the first or last five lines of the file contains: ex: command : or vi: command : the command is executed for you. VI is very flexible when it comes to initialization. The first thing it does is to check for the EXINIT environment variable. If this does not exist it looks for ".exrc" in your home directory. After this a ".exrc" in your current directory is searched for. The last part is to look for "modelines". Usually, the $home/.exrc contains things you always want (set ic report=1). The .exrc in a directory contains directory specific stuff, i.e. "set ai sm" for source directories; "set wm=10" for document directories. The modelines are a per-file initialization. If you have a "document file" in a "source" directory you can override the initialization by doing: ex: set wm=10 noai nosm : ...text.... Now, your .signature file contains: .... Telex: 154232428 ICUS h: .... VI is trying to go to line 154232428 in the file (which doesn't exist) hence the error message. If you did have that many lines you would then get a message to the effect that "ICUS" is an invalid command. Some versions of VI now have a "modeline/nomodeline" command to turn this off. You might try it in your EXINIT environment variable or $home/.exrc file. If that doesn't work, you'll need to change your signature file. ---- Joe Boykin Encore Computer Corp Chairman, IEEE Computer Societies Technical Committee on Operating Systems UUCP: encore!boykin ARPA: boykin@multimax.arpa