简体   繁体   中英

Vscode Shortcut for run script on terminal?

There is a way that allows me that when I am editing a js file I can through a shortcut: open the terminal and run it automatically:

1- Open terminal 2- node my-file.js

Right now it only manages to open terminal with shortcut "ctrl + ´" but then I have to type "node my-file.js"

There is easy way to run JavaScript, no configuration needed:

  1. Install the Code Runner Extension
  2. Open the JavaScript code file in vscode, then use shortcut Control+Alt+N (or ⌃ Control+ Option+N on macOS), or press F1 and then select/type Run Code , the code will run and the output will be shown in the Output Window.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM