On Sat 16-Sep-06 5:23pm -0600, Elliot Shank wrote:
> From what I understand from the help, you should be able
> to use <afile> anywhere in an autocmd to get the name of
> the file being dealt with. So why does this complain
> "E121: Undefined variable: afile":
>
> autocmd BufNewFile *.pm echomsg 'Creating ' <afile>
>
> Obviously, I don't understand when this can be used.
You could use it like this:
autocmd BufNewFile *.pm echomsg 'Creating ' . expand("<afile>")
or
autocmd BufNewFile *.pm echomsg 'Creating' expand("<afile>")
--
Best regards,
Bill