title: How to run javascript file in vim editor
body: <p>this is my file tree</p>
  <pre><code>- dir1
    |-subDir1
    |-subDir2
    |-subDir3
      |-index.js
      |-readme.md
  </code></pre>
  <p>i used to open vim editor by <code>$ vim index.js</code> in subDir1, 2 or ... and i was able to use <code>:!node %</code> in the editor.</p>
  <p>But i really don't wanna type cd .. and cd subDir repeatedly, actually i don't have to do that thanks to nerdtree</p>
  <p>After i open vim editor in dir1, how can i execute js file which is located in specific dir without leaving vim editor?</p>
  <p>--</p>
  <ul>
  <li>Edit
  I cannot do <code>!node %</code>, because i'm in dir1, not subDir1.
  But i can edit javascript files in the editor.
  is there anyway to specify THE file that i'm editing, with % parameter?</li>
  </ul>