title: How to perform File Extension based Actions in VIM?
body: <p>I want to perform rubyf action in VIM when I press F5 if the file is of .rb extension.
  Right now I just have </p>
  
  <pre><code>map &lt;F5&gt; :rubyf % &lt;CR&gt;.
  </code></pre>
  
  <p>But I also want to interpret scheme files if its .scm or compile tex etc using the same F5. How do I check the file extension and perform the correct binding? How do you guys compile different files in G/VIM?</p>