title: How to run javascript in gvim?
body: <p>My system : xp + gvim.<br>
  I have open gvim to edit a  javascript sentence ,the file has no name yet.  </p>
  
  <pre><code>print(sum(range(1, 10)));
  </code></pre>
  
  <p>I want to map <code>&lt;F7&gt;</code> to javascript ,how can i write the map sentence in <code>_vimrc</code>?<br>
  How  can i get <code>55</code>  when i input <code>F7</code>  when the configuration finished?</p>
  
  <p>I do as <code>elclanrs</code> say ,error output is</p>
  
  <pre><code>C:\WINDOWS\system32\cmd.exe /c ( node ^&lt;C:\DOCUME~1\sanya\LOCALS~1\Temp\VIi8C.tmp)    
  [stdin]:1    
  print(sum(range(1, 10)));    
        ^    
  ReferenceError: range is not defined    
      at [stdin]:1:11    
      at Object.&lt;anonymous&gt; ([stdin]-wrapper:6:22)    
      at Module._compile (module.js:456:26)    
      at evalScript (node.js:532:25)    
      at ReadStream.&lt;anonymous&gt; (node.js:154:11)    
      at ReadStream.EventEmitter.emit (events.js:117:20)    
      at _stream_readable.js:920:16    
      at process._tickCallback (node.js:415:13)    
  shell returned 8    
  Hit any key to close this window...    
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/G4LaC.jpg" alt="enter image description here"></p>