Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!apple!olivea!uunet!ogicse!pdxgate!eecs!kirkenda From: kirkenda@eecs.cs.pdx.edu (Steve Kirkendall) Newsgroups: comp.editors Subject: Re: A question on .exrc while using vi Keywords: exrc vi Message-ID: <914@pdxgate.UUCP> Date: 13 Dec 90 18:44:17 GMT References: <5315@graphite20.UUCP> <1990Dec9.033641.9731@csn.org> <110105@convex.convex.com> <8490@star.cs.vu.nl> Sender: news@pdxgate.UUCP Reply-To: kirkenda@eecs.UUCP (Steve Kirkendall) Organization: Portland State University, Portland, OR Lines: 36 In article <8490@star.cs.vu.nl> gpvos@cs.vu.nl (Gerben 'P' Vos) writes: >Several people wrote in follow-up to: >>:>> The goal: >>:>> All I am trying to do is replace the 'the's by 'an's. >>:>> That's all. > >The answer was: >> %s/\/an/g > >Now, does anyone know what caused the core dump when the original poster put >something quite like this (only slightly incorrect) in his .exrc ? Hmmm... When I added the ":set directory=..." option to Elvis, I discovered a potential problem: - The "directory" option says where the temp files should be stored; so it must be set before the first temp file is created. - It should be settable in a user's .exrc file; so the .exrc file must be run before the first temp file is created. - A temp file *must* be created when you start to edit a file. - Therefore, when .exrc is being run, Elvis can't be editing anything! Currently, Elvis will issue an error message if your .exrc tries to use any commands which act upon a text. Only things like ":map" and ":set" are allowed. Eventually, I plan to modify Elvis so that it starts up the first file when you give the first text-sensitive command, but I haven't done that yet. Perhaps there are versions of vi out there that don't handle this in a safe way? That neither give error messages, nor correctly start up the first file? ------------------------------------------------------------------------------- Steve Kirkendall kirkenda@cs.pdx.edu Grad student at Portland State U.