官术网_书友最值得收藏!

Installing Sublime Text on Windows 32/64 bit

This section will explain how to install Sublime Text on Windows 7/8, 32/64 bit. It is important to get the right version because the 64-bit version won't run on a 32-bit PC.

Go to http://www.sublimetext.com/3 and download the relevant file for 32-bit or 64-bit. A file called Sublime Text Build # Setup.exe will be downloaded. Open the file and you will be guided through the setup. Click on Next and choose setup location. Next, add Sublime to the explorer context by American English: should use "checking" Add to explorer context menu as shown in the following screenshot:

Installing Sublime Text on Windows 32/64 bit

Then, finish the installation. We have just installed Sublime! Are we done? Not yet.

Adding Sublime to the environment

We want to add Sublime to our environment so we can use it straight from the command line. Open Run by pressing WinKey + R and enter sysdm.cpl, as shown in the following screenshot:

Adding Sublime to the environment

Click on OK, the System Properties window should open. Now, go to the Advanced tab and click on the Environment Variables… button at the bottom-right corner. Environment variables should open, look for the Path variable in System variables, double-click it to open the Edit System Variable window, and add your Sublime installation path to the end of the Variable value field prefixed with a semicolon, as shown in the following screenshot:

Adding Sublime to the environment

As we can see, my installation path is D:\Program Files\Sublime Text 3. Click on OK. Now we can run Sublime from the command line by typing sublime_text filename where filename is the file to edit. But the sublime_text command is too long to type every time we want to open a file with Sublime. Go to your installation directory and create a new file named subl.bat. Paste the following code into the file:

@echo off
start sublime_text.exe %*

The first line turns off the echo of the .bat file. This means that we won't see any output when we run the file. The second line will start the sublime_text executable with the given parameters.

Save the .bat file and open a new command line. We can now use the following commands in our command line:

subl filename ("filename" is the filename to edit)
subl foldername ("foldername" is the folder to open)
subl . (to open the current directory)

That's it; we have Sublime on our Windows PC!

主站蜘蛛池模板: 嵊泗县| 镶黄旗| 洪湖市| 达拉特旗| 威信县| 衡阳县| 石棉县| 额尔古纳市| 嘉黎县| 柏乡县| 漠河县| 双城市| 紫金县| 新化县| 武胜县| 曲麻莱县| 台安县| 巴彦县| 宁蒗| 镇坪县| 大关县| 锡林浩特市| 锡林浩特市| 和硕县| 资阳市| 顺昌县| 巴里| 天峨县| 渝中区| 镇巴县| 南昌市| 塔城市| 崇仁县| 乌兰察布市| 贵定县| 巩义市| 定兴县| 娄底市| 西畴县| 航空| 佛山市|