Locked learning resources

You must own this product to watch this lesson.

Locked learning resources

You must own this product to watch this lesson.

Installing Sublime Text

00:01 Hey, and welcome to the first lesson. What we’re going to do now is we’re going to install Sublime Text 3 from scratch on a fresh Windows 10 install. And I’m going to walk you through the basic steps so we can begin integrating Sublime Text in Python with the next lesson. So we’ll install Sublime Text 3 now, and then we’ll set it up so we can install additional plugins and really make a nice Python development setup. Okay, let’s jump right in.

00:26 The first thing you want to do is open a browser. I’m just going to go with the stock browser here, and then you want to go to sublimetext.com. This should already detect your operating system and when you scroll down, it should make a suggestion on what version of Sublime Text to install.

00:47 You might be wondering, “Should I go with Sublime Text 3 or Sublime Text 2?” And at this point in time, there’s no question. You should definitely go with Sublime Text 3. 99% of the plugins, they will work with Sublime Text 3.

01:00 Sublime Text 3 is under active development, so this is the version the developers are actively working on, where they’re making improvements and shipping new features. It’s also faster than Sublime Text 2.

01:12 There’s really no reason to go with Sublime Text 2 at this point. So, we’re just going to go with the suggestion here and click the download button. This will detect if you’re on a 64-bit or 32-bit operating system.

01:26 And usually these days, you’ll probably be on a 64-bit version of Windows anyway, so generally it makes sense just to go with that recommendation. I’m going to download the file now. All right, and then once that’s finished downloading, we can just run the installer and actually close the browser window here.

01:43 Yeah, let’s go ahead with the install.

01:46 I think it makes the most sense just to go with the default folder here. And then if you want the ability to open any file in Sublime Text, then you can also check that box and it will add a little context menu to the explorer, so we can just right-click and click on open in Sublime Text, which is kind of nicer—I generally want to check that box. Okay.

02:08 And we’re done! Okay, so let’s launch Sublime Text for a first time, and usually the easiest way to do that is just to go to the search box and search for Sublime. All right, Sublime Text 3.

02:20 And then we’re also going to pin that here to the task bar, so we can easily launch Sublime Text 3 in the future.

02:30 All right, so we’ve got a basic install of Sublime Text 3 now. And you can see up here that it still says Unregistered. If you do have a Sublime Text 3 license, then you can enter that license by going to the Help screen and to Enter License.

02:45 And it absolutely makes sense to purchase a license for Sublime Text 3, because if you’re using an unregistered copy, you can still have access to all the features in Sublime Text, but you’re going to get this little nag screen every couple of times you save a file. And I find this can really destroy my focus, so it’s absolutely worth buying a license for Sublime Text 3 if you’re wondering. Okay, I’m just going to go ahead and register my copy real quick so that we don’t have to deal with this Unregistered warning and then the nag screen. Be right back. Okay, so I just pasted in my license code and I’ve got my copy registered here.

03:18 There’s one more thing we need to do here, and that is installing the Package Control package manager. Some of the most powerful features for Python development with Sublime are part of Sublime Text plugins, or packages, and we must install those separately.

03:34 And of course, we could install them manually by downloading a bunch of files and then copying that to the right folder. It’s actually much more convenient to use a tool called Package Control.

03:44 Package Control is a plugin manager for Sublime Text that will allow us to install, upgrade, or remove plugins directly from within Sublime Text. It’s going to make all of the future steps where we need to install plugins a lot easier. So let’s set up Package Control now. And this has become really, really easy in the latest version of Sublime Text, because you just need to click on Tools and then on Install Package Control. This will take a short while, and then that’s it!

04:13 Now we’ve installed Package Control. And I want to show you what this changed. A really important feature in Sublime Text is the Command Palette here.

04:22 You can either open that up by clicking on Tools > Command Palette, and it will open up this window. Or, it actually pays to remember this shortcut, which is Control + Shift + P.

04:33 I can also hit that and then it’s going to pop up the Command Palette here. And then what the Command Palette allows us to do, it’s basically almost like a command line interface to Sublime Text.

04:44 With the Command Palette, you can access most of the features that are available here in the menu bar. So for example, if you wanted to edit the Sublime Text preferences, you could either click through the Preferences menu here and then find what you want, or you could just trigger the Command Palette and then type in pref, and this would autocomplete or match these other settings here that you can then select with the up-down cursor keys and just hit Return and it would take you directly to the settings.

05:13 So, what installing Package Control did is it added a couple of new commands to the Command Palette. And the most important one here is the Install Package command. With this command, we can install additional Sublime Text packages or plugins very easily directly from within Sublime, and it’s going to find all of the packages that are available in the Package Control library. So when I trigger this command by hitting Return, it’s going to load the available plugins, and then I get this list of available packages that I can search just by typing in a name. So, for example, one of the packages that we’re going to install later is called Anaconda.

05:50 And because of the fuzzy matching, I can just type Anna and it’s automatically going to match with this package. And I can just hit Return, and this would install the Anaconda plugin for Sublime Text.

06:02 There are a couple more features that were added here. I just search for Package Control. This is going to show us all of the new commands that were added by installing Package Control. So for example, what you can do with that as well is you can temporarily disable packages.

06:16 For example, if you have a plugin installed that you don’t want to use all the time, you can disable this package with the Disable Package command in Package Control, and then you don’t have to uninstall and then re-install that package or that plugin all the time. So this can be a really convenient feature.

06:32 You can also upgrade packages, so you can use Package Control just to install the latest version of a package you have already installed. So, Package Control is a really, really awesome tool and it’s going to be really important moving forward, so you’ll want to familiarize yourself a little bit with this.

06:49 It’s a really powerful tool that’s going to open up a whole universe of Sublime Text plugins and packages for us. All right, so at this point we have a basic installation of Sublime Text 3.

07:00 I’m just going to bump up the font size here a bit so that in the upcoming videos you can actually see what’s going on here in my code editor. And now we’re going to move on and install Python, and then start integrating Python with your Sublime Text setup so that you have a really awesome and easy-to-use Python development environment ready.

Avatar image for jvee2

jvee2 on Aug. 30, 2020

Disappointed that packages to be installed are not findable (by me anyway) or have changed names (?). Ex = All install works including search finds “Ana ” However, next when search “Package Control = NOTHING. Tried in both Mac and Windows with same result.

Avatar image for swisher

swisher on Jan. 17, 2023

Sublime Text 3 does not look like it has received a new update since October 2019. Everything in this tutorial seems to work with Sublime Text 4 except the go to definition using Anaconda. When I do the right click go to definition on namedtuple I get “Unable to find namedtuple”. Is there a setting somewhere that I am missing so that it can search the standard library?

You must own this product to join the conversation.