Path: utzoo!utgpu!watserv1!watmath!att!att!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!swrinde!ucsd!ucbvax!TRANSARC.COM!Dan_Bloch From: Dan_Bloch@TRANSARC.COM Newsgroups: comp.editors Subject: Re: including filename with vi Message-ID: Date: 3 Nov 90 16:57:10 GMT References: <484@ssc.UUCP> Sender: daemon@ucbvax.BERKELEY.EDU Lines: 16 fyl@ssc.UUCP (Phil Hughes) writes: > 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. To insert the filename as it was given to vi: :r !echo % To insert the current pathname followed by this: :r !echo $cwd/% Dan Bloch dan@transarc.com