Home Web Front-end JS Tutorial Nodejs sublime text 3 installation and configuration_node.js

Nodejs sublime text 3 installation and configuration_node.js

May 16, 2016 pm 04:43 PM
nodejs sublime

1) Download sublime and install it, download list: http://www.jb51.net/softs/132432.html

2) Download the nodejs plug-in for sublime. You need to integrate the Nodejs plug-in into sublime. Download address: https://github.com/tanepiper/SublimeText-Nodejs

3) Unzip the zip file and rename the folder "Nodejs"

4) Open sublime, operate "preference" --> "Browse packages", and open a directory, which is where many language IDE plug-ins are stored.

5) Copy the "Nodejs" folder to this directory. Is this enough? If it still doesn't work, you still need to change the configuration file.

6) Open the Nodejs folder, find the file "Nodejs.sublime-build", drag it to sublime, it will 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"] 
    } 
  }
Copy after login
You need to change the places marked above. You need to change the encoding to GB2312 or utf8. If you do not change this attribute, it may cause the terminal to display garbled characters when building nodejs code.

7) To use sublime to open the file "Nodejs.sublime-settings" or set "preference" --》 "package settings" --》 "Nodejs" --》 "setting-default" Open the file and change it to:

{
 // 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
}
Copy after login

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What should I use to open html? What should I use to open html? Apr 21, 2024 am 11:33 AM

What should I use to open html?

Is nodejs a backend framework? Is nodejs a backend framework? Apr 21, 2024 am 05:09 AM

Is nodejs a backend framework?

How to open local file in html How to open local file in html Apr 22, 2024 am 09:39 AM

How to open local file in html

How to create py file in python How to create py file in python May 05, 2024 pm 07:57 PM

How to create py file in python

What is the difference between npm and npm.cmd files in the nodejs installation directory? What is the difference between npm and npm.cmd files in the nodejs installation directory? Apr 21, 2024 am 05:18 AM

What is the difference between npm and npm.cmd files in the nodejs installation directory?

Is nodejs a back-end development language? Is nodejs a back-end development language? Apr 21, 2024 am 05:09 AM

Is nodejs a back-end development language?

What are the global variables in nodejs What are the global variables in nodejs Apr 21, 2024 am 04:54 AM

What are the global variables in nodejs

Is there a big difference between nodejs and java? Is there a big difference between nodejs and java? Apr 21, 2024 am 06:12 AM

Is there a big difference between nodejs and java?

See all articles