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.