Nodejs sublime text 3 installation and configuration

Source: Internet
Author: User

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}

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.