1) Download sublime and install, download list: http://www.jb51.net/softs/132432.html
2) Download Sublime Nodejs plug-in, need to be integrated Nodejs plugin to sublime, download address: Https://github.com/tanepiper/SublimeText-Nodejs
3 Extract the zip file and rename the folder "Nodejs"
4 Open Sublime, operation "preference"--> "Browse packages", open a directory, this directory is a host of languages IDE plug-in storage.
5 Copy the "Nodejs" folder to this directory. Is that all you got? The sauce does not work, and the configuration file is changed.
6 Open Nodejs folder, find File "Nodejs.sublime-build", drag and drop to sublime, show:
{
"cmd": ["Node", "$file"],
"File_regex": "^[]*file \" (... *?) \ ", line ([0-9]*)",
"selector": "Source.js",
"shell": true,
"encoding": "cp1252",
"Windows":
{
"cmd": ["taskkill/f/im Node.exe & Node", "$file"]
},
"Linux":
{
"cmd": ["Killall node; Node ', ' $file ']
}
}
You need to change the label above to change encoding to GB2312 or UTF8, and if you do not change this property, the terminal will appear garbled if you do not make the build Nodejs code.
7 to use sublime to open the file "Nodejs.sublime-settings" or set "preference"-"Package Settings"-"Nodejs"-"setting-default" Open the text and changed into:
{
//save before running commands
"Save_first": true,
//If present, use this command instead of plain "node" c4/>//e.g. "/usr/bin/node" or "C:\bin\node.exe"
"Node_command":/usr/bin/nodejs,
//Same for NPM command
Npm_command ":/USR/BIN/NPM,
//as ' Node_path ' environment variable for NODE runtime
" Node_path ": false,
" Expert_mode ": false,
" Ouput_to_new_tab ": false
}