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.
