title: Get the file name without file extension in a Vim function
body: <p>I want to get the file name without the file extension in Vim.</p>
  <p>I wrote the following function in my <code>.vimrc</code> file to compile and run the Java program:</p>
  <pre><code>:function! JAVA_RUN()
  :!javac %^M
  :endfunction
  
  map &lt;F3&gt; :execute JAVA_RUN()&lt;CR&gt; :source $HOME/.vimrc&lt;CR&gt;
  </code></pre>
  <p>How can I get the file name without the extension inside the function?</p>