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 plug-in to sublime,: https://github.com/tanepiper/SublimeText-Nodejs
3) decompress the zip file and rename the "Nodejs" folder"
4) Open sublime and operate "preference" --> "Browse packages" to open a directory where many IDE plug-ins are stored.
5) copy the "Nodejs" folder to this directory. Can this be done? The sauce does not work yet. You need to change the configuration file.
6) Open the Nodejs folder, find the file "Nodejs. sublime-build", drag it to sublime, and display:
{ "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 above annotation to GB2312 or utf8. If you do not change this attribute, the terminal may display garbled characters when building nodejs code.
7) Use sublime to open the file "Nodejs. sublime-settings or set "preference" -- "" package settings "--" Nodejs "--" setting-default "to open the file and change it:
{ // save before running commands "save_first": true, // if present, use this command instead of plain "node" // 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}