Path: utzoo!attcan!uunet!mcsun!unido!quando!omerzu From: omerzu@quando.quantum.de (Thomas Omerzu) Newsgroups: comp.unix.questions Subject: Re: Obscure Vi bug? Summary: no bug, modeline feature Message-ID: <1653@quando.quantum.de> Date: 3 Aug 90 07:37:24 GMT References: <1990Aug2.211835.24599@math-cs.kent.edu> Reply-To: omerzu@quando.quantum.de (Thomas Omerzu) Organization: Quantum GmbH, Dortmund, W-Germany Lines: 33 In article <1990Aug2.211835.24599@math-cs.kent.edu> jstuart@math-cs.kent.edu (Jeff Stuart) writes: >We have a problem here also with vi that when you edit a file and that >file contains an ei: possibly followed by some text and then another : >vi gives an error message. This happened on two machines, 1) Plexus What you have discovered is the Ex/Vi-modeline feature; a short Ex-manual excerpt: | With the modeline option in effect, the editor checks the | first five lines of the text file for commands of the form | ex: command: | or | vi: command: | if any are found, the editor executes them. This can result | in unexpected behavior, and is not recommended in any case. | In earlier releases, modeline was in effect by default. Now | it is not, but setting it in the .exrc file or the EXINIT | environment variable can still produce untoward effects. On some versions of vi this feature does not only accept the strings 'vi' and 'ex' but also combinations of them, i.e. 'vx' and 'ei'; this may be considered to be a bug and is obviously the case with your vi-version. -- *-----------------------------------------------------------------------------* Thomas Omerzu UUCP: ...!unido!quando!omerzu / omerzu@quando.uucp Quantum GmbH, Bitnet: UNIDO!quando!omerzu / omerzu%quando@UNIDO(.bitnet) Dortmund, Germany Internet: omerzu@quando.quantum.de