Unlimited Plugins, WordPress themes, videos & courses! Unlimited asset downloads! From $16.50/m
by
FREELessons:34Length:2.5 hours

Next lesson playing in 5 seconds

Cancel
  • Overview
  • Transcript

4.6 Sidebar Enhancements

So think about it. If I right-click on one of these folders or files, there really aren't that many options. So let's fix that. I'm gonna install. And it's called Sidebar Enhancements. So let's get that set up. So the first thing you'll notice now with it installed is when I right-click, you have a lot more options. Almost too many options at this point. So you see we know have options to Find in Folder, Find Advanced, Add Folders to Projects. But you can do more than this. There's a lot more to it than meets the eye. For example, I've created this index.html file. Let's go ahead and add a doc type, and be good citizens. If I wanna view this in the browser, I can right-click on the file and choose Open in Browser. Now if this option is not showing up for you, you might need to restart Sublime. So if it is, give it a restart and see if that works. So I open it up in the browser and sure enough that works. But what if I want to assign that to a shortcut. Well, there actually already are some shortcuts for you. But we don't know what they are. Well let's go to Sublime and view the Read Me file. Side bar enhancements. And now we can look over the Read Me but what I'm most interested in is the key maps for my OS which is OS X. If you're a Windows user you're gonna open that one. Let's bring that in and now we can see there already are some key bindings for us. So ctrl+T to create a new file within the sidebar. That works. But also F12 which will open the file within the browser. However, I don't like that. So I'm going to change it to something, and name this whatever you want. But I'm gonna change it to ctrl+O. So now when I type Ctrl+O, that should open the current file within the browser. Ctrl+O, and now that's immediately open to the file, very cool. Now remember though, I mentioned earlier that I don't like memorizing lots of shortcuts. So if I ever forget that, we can always bring up the command pallet, Shift+Cmd+P. Browser, there is it is, File > Open In Browser. And there we go. Now we get the exact same thing. So feel free to use whichever option works for you. Now we can do even more though. What if we're working on our server. Well in that case, this path would not work. We would want to go through localhost for example. Well you can adjust that to go to Sample. But before we do that, we need to be working in an actual project. So let's bring up the command palette. And I'm gonna look for Project. And let's save this project. And we're gonna call it Sample. And now that we've done that, I can either go to Sample>Project>Edit Project. Or we can just open the Sublime project. One last way, because there's always options, is to Shift+Cmd+P, Edit Project. And if you have any issues with that just give Sublime a restart and that should activate it. So now if we want to specify a URL we could say the URL, and by the way, for production you could also add production as well. But let's keep it like that and we're gonna set it to localhost, maybe 8888, if that's what you have set up. And just set that up however you need to. So now with that saved whenever you try to open a file with Ctrl+O that's now going to that URL. And in this case I don't have any server running but if I did that would work. And that's a tip that a lot of people don't know so keep that one in mind. I'll see you in the next video.

Back to the top