Nodejs Sublime Text 3 installation and configuration _node.js

Source: Internet
Author: User
Tags sublime text

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
}

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.