On Thu, Sep 18, 2003 at 11:13:13AM +1000, Andrew Bennetts wrote:
> On Wed, Sep 17, 2003 at 11:00:06PM +1000, Ken Foskey wrote:
> >
> >
> > I have a problem trying to make my commenting script easier. I have
> > worked out how to add the date automatically to the auto header I
> > created. but I need the current filename.
> >
> > imap ,vvi .filename.cpp..<c-r>=strftime("%d/%m/%y")<cr>
> >
> > I want to put the filename of the current buffer into the starting
> > comment block automatically. how?
>
> By putting $Id$ in your source, and letting CVS fill it in for you ;)
And to answer the question as actually asked, I think expand('%') will get
the current file name, but I know very little about scripting vim...
-Andrew.
--
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug