All say sublime text is to write code artifact, so I also downloaded the text! JavaScript is used later, and you want to use as many languages as possible in a single tool! So try to configure JavaScript in sublime text.
Find a lot of information on the Internet, and later proved that many are not necessarily right. But although not, but all have the same idea. is to use Nodejs to write JavaScript, so we have to install a nodejs first.
This is Nodejs's official website: http://nodejs.org/: http://nodejs.org/download/
Here is the download page, please note that according to their own computer to choose the appropriate version, I chose the Windows Installer (. msi)
It should have been a smooth move into the next step, but the problem came. My system is win7 version, do not know why the MSI type of file is not working properly, cannot install!
Later on the internet to find a lot of methods, including modify the registry, and so on, may win7 more special, not only can not open the MSI type of file, but also appeared "system administrator set System Policy, prohibit this installation" this prompt!
All kinds of problems have tortured me for a long time!
The Final Solution is:
One: Manually start the Windows Installer service first. Method: Control Panel-system security-management tools-Services-windows Installer boot
Two: If the previous step does not solve the problem, then we will download the Windows Installer installation package directly on the Internet and install!
Three: The final step is very humble, but it is critical, otherwise Windows Installer will not be effective, that is, after installation, restart the computer!
Now we can install the Nodejs smoothly.
For example, let's check if the NODEJS installation is successful!
Nodejs finally installed successfully, now we should be in the sublime text inside the programming environment of JavaScript configuration!
One: Open sublime.text--Tool--compile system--new compiling system
Two: Copy and paste the following code:
{
"cmd": ["Node", "$file"],
"File_regex": "^[]*file \" (...) \ ", line ([0-9]*)",
"Selector": "Source.js",
"Shell": true,
"Encoding": "cp1252",
"Windows":
{
"cmd": ["Node", "$file"]
},
"Linux":
{
"cmd": ["Killall node; Node "," $file "]
}
}
and save the file as Javascript.sublime-package.
Next Open the sublime text, and then in the compilation system check the JavaScript, you can start to write,!
Compile the time directly ctrl+b, but also note that to use the Console.log function, belong to the debug function. This is also very important, be sure to pay attention!!
Configuring the JavaScript Authoring environment for sublime text