Under Windows configuration Sublime Text 2 development Nodejs

Source: Internet
Author: User
Tags sublime text

1 Download Sublime Text 2
http://www.sublimetext.com/

2 download Nodejs plugin, download Zip package
Https://github.com/tanepiper/SublimeText-Nodejs

3 Unzip the zip and rename it to Nodejs

4 Copy the Nodejs to the C:\Users\Administrator\AppData\Roaming\Sublime Text 2\packages directory

5 Restart Sublime Text 2->tools-->build System-->nodejs

6 Configure the Nodejs path Preferences-->package setting-->nodejs-->default, with my configuration as follows

{
Save before running commands
"Save_first": true,
If present, use the This command instead of plain "node"
e.g. "/usr/bin/node" or "C:\bin\node.exe"
"Node_command": "D:\\tools\\nodejs\\node.exe",
Same for NPM command
"Npm_command": "D:\\tools\\nodejs\\npm.cmd",

"Expert_mode": true,

"Ouput_to_new_tab": false
}

7 C:\Users\Administrator\AppData\Roaming\Sublime Text 2\packages\nodejs\nodejs.sublime-build to be modified, with my revised content as follows:

{
"cmd": ["D:\\tools\\nodejs\\node.exe", "-P", "$file"],
"File_regex": "^[]*file \" (...) \ ", line ([0-9]*)",
"Selector": "Source.js",
"Shell": true,
"Encoding": "GB2312",
"Windows":
{
"cmd": ["D:\\tools\\nodejs\\node.exe", "$file"]
},
"Linux":
{
"cmd": ["Killall node; Node "," $file "]
}
}

8 All right, the development tools are ready to be developed.

We create a JS file in the editor, Ctrl+b Run or run on Tools->nodejs.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.