title: How to source files in .vimrc
body: <p>I am trying a simple means of sourcing a file based on the filetype of the new opened file. For example, I want to source python.vimrc when a new file is *.py. This code (in .vimrc)</p>
  <pre><code>function LoadFileTypeDefaults()
    let vimrcfile = &amp;filetype . '.vimrc' 
    if filereadable(vimrcfile)
      echo vimrcfile
      source vimrcfile
    endif
  endfunction
  </code></pre>
  <p>gives the following error when I do <code>vi new.py</code></p>
  <blockquote>
  <p>python.vimrc</p>
  <p>Error detected while processing function LoadFileTypeDefault:</p>
  <p>line    4:</p>
  <p>E484: Can't open file vimrcfile</p>
  </blockquote>
  <p>My python.vimrc is in my runpath. Moreover, if I replace</p>
  <pre><code>source vimrcfile
  </code></pre>
  <p>with</p>
  <pre><code>source python.vimrc 
  </code></pre>
  <p>everything works as required.</p>
  <p>What am I missing?</p>