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 FilesSublime 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!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset