Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!zaphod.mps.ohio-state.edu!samsung!noose.ecn.purdue.edu!en.ecn.purdue.edu!irick From: irick@ecn.purdue.edu (GarBear Irick) Newsgroups: comp.editors Subject: Help with vi's "map" Message-ID: <1990Sep2.062510.27277@ecn.purdue.edu> Date: 2 Sep 90 06:25:10 GMT Distribution: usa Organization: Purdue Society for Better Computing Lines: 16 Just for fun, I decided to map my function keys to compile a C program on- the-fly. The macro writes the current text out to a temp file, compiles it, and goes back to the editor, as belo: map @ :w! /tmp/irick/cprog.%:!cc -o /tmp/irick/EXEC /tmp/irick/cprog.% The only _problem_ is, vi now thiks that /tmp/irick/... is the new filename of the file, so when I ZZ or :wq to get out of vi, it changes the temporary file, not the original one. Is there a way to change the current filename in vi WITHOUT writing over that filename? Thanks..... -- Gary A. Irick, Purdue University | INTERNET: irick@en.ecn.purdue.edu | UUCP: ...!pur-ee!irick |