title: Autocommand for new file of specific filetype
body: <p>I want to run some vim commands anytime I create a new file of a specific file type, sort of combination of the <code>BufNewFile</code> and <code>FileType</code> autocommand events.</p>
  
  <p>I have <code>BufNewFile</code> autocommands setup in filetype.vim to set the filetype based on the file extension, but I have multiple extensions that all correspond to the same filetype. I'd like to encapsulate the information about which file-extensions correspond to a particular file-type just in this one place, and then have other autocommands run based just on the filetype. However, I can't just use the <code>FileType</code> event, because I only want to perform the commands for new files, not when editing existing files.</p>
  
  <p>For instance, in filetype.vim, I have:</p>
  
  <pre><code>au BufRead,BufNewFile *.cir setfiletype spice
  au BufRead,BufNewFile *.sp setfiletype spice
  au BufRead,BufNewFile *.spice setfiletype spice
  </code></pre>
  
  <p>I thought maybe I could add a <code>BufNewFile</code> autocommand in the ftplugin file for this filetype, like this:</p>
  
  <pre><code>echo "Spice file."
  au BufNewFile &lt;buffer&gt; echo "New spice file!"
  </code></pre>
  
  <p>But when I create a new file, e.g., "test.cir", it doesn't run the auto-command. It runs other commands in the ftplugin file (for instance, I get the "Spice file." echo) but not the autocommand.</p>
  
  <p>Alternatively, if there's some way in vimscript that I can tell whether or not a file is new, then I could run the commands directly in the ftplugin, conditioned on whether or not it is new.</p>