I'm wondering if it's possible with vim to create a macro which will run only on new blank files given a certain filetype.
I'd personally like that when I create xy.tex it will automatically populate the document with my headers, etc. I realise I can run a command on opening a file by execute "echo blah" or whatever, but I'm not really sure how I'd go about executing ONLY on a new (Blank) file. Any ideas?