Path: utzoo!utgpu!watserv1!watmath!att!mcdchg!ddsw1!dattier From: dattier@ddsw1.MCS.COM (David W. Tamkin) Newsgroups: comp.editors Subject: Re: including filename with vi Message-ID: <1990Nov03.192204.3860@ddsw1.MCS.COM> Date: 3 Nov 90 19:22:04 GMT References: <484@ssc.UUCP> Reply-To: dattier@ddsw1.MCS.COM (David W. Tamkin) Organization: Contributor Account at ddsw1, Wheeling, Illinois Lines: 15 fyl@ssc.UUCP (Phil Hughes) wrote in <484@ssc.UUCP>: | A friend just asked how to include the name of the current file | in vi. In other words, he wants the current file pathname inserted | into the text for reference purposes. I couldn't think of how to do it. | I wrote the shell script below as a nasty hack to solve the problem but | it seems there must be a vi'ish way to do it. :r !echo % In shell escapes, vi replaces unquoted percent signs with the current file name. David Tamkin Box 7002 Des Plaines IL 60018-7002 708 518 6769 312 693 0591 MCI Mail: 426-1818 GEnie: D.W.TAMKIN CIS: 73720,1570 dattier@ddsw1.mcs.com