Visual Studio Code for Python Developers Transcripts
Chapter: Exploring the Editor
Lecture: The Terminal

Login or purchase this course to watch this video and the rest of the course contents.
0:00 One of the key tools when it comes to your overall development workflow when working on a project is your terminal or command line.
0:08 This acts as a way for you to run your projects, build them, compile them, test them, all kinds of different actions you might take within the project that you're working on.
0:17 And what's nice is Visual Studio Code comes with an integrated terminal built into it.
0:22 The way you can access that is from a number of ways, but one being the view menu and going down to terminal.
0:29 Or as you see in the menu here, the keyboard shortcut related to that is control back tick.
0:35 That's for Windows and Linux or command back tick if you're on macOS.
0:40 Click on that and we'll notice that the terminal view within that bottom panel is now at the forefront.
0:46 I'm going to make it a little bit bigger really quick. And right off the bat, you might notice that my terminal is likely looking different than yours.
0:54 And that is because I have on my host operating system Windows here or WP. WSL, Windows Subsystem for Linux.
1:01 I've configured my shell and the way that shell theming is within that space. So that's how you would go about doing that yourself.
1:09 But what's great here is Visual Studio Code will just reflect that.
1:13 One way you need it to do that or to get that set up is by indicating to Visual Studio Code what should be your shell type.
1:21 And that's where this little menu by the plus icon here, if you click that down arrow, you can see default is ZSH, which is the default default.
1:29 Which is Z shell. That's my default one.
1:31 But I also have access on this operating system to bash shell, JavaScript debug terminal, T mux, and then a couple other options related or related to terminal workflows.
1:41 Maybe I want to split the terminal or configure terminal settings, set, select the default profile, which you can see here, which is the S H and then run tasks and configure tests.
1:51 That'll be covered later. If you have set up your own shell on your operating system, just be sure to come over here. Click that little menu.
1:59 And tell Visual Studio Code what the default one is.
2:02 So in this case it was bash for me before, but now I switched it over to that Z shell, which I like to use personally.
2:09 And that's why mine looks a little bit different here.
2:11 You can get into the weeds on tweaking and configuring your shell, but that is outside the scope of this course and Visual Studio Code, to be honest.
2:20 But to dive deeper into the behavior of how the terminal can be used within Visual Studio Code, you can see I have two separate instances that are open.
2:28 These act as. Almost like tabs, just like how you have editor tabs for different files you might have open. You can have terminal tabs here.
2:36 You can split these. Horizontally. Don't necessarily be two separate tabs that you would click into.
2:43 You can have both of them visible at the same time. Let's say you accidentally opened up in that split view and you don't want that terminal anymore.
2:50 You can click the little trash icon to remove it. You can move terminal into the editor area, which is nice.
2:56 So you get a little bit more real estate when you're working with it. So you get a little bit more real estate when you're working with it.
2:58 So you get a little bit more real estate when you're working with it. So you get a little bit more real estate when you're working with it.
2:58 So you get a little bit more real estate when you're working with it. So you get a little bit more real estate when you're working with it.
2:59 So you get a little bit more real estate when you're working with it. So you get a little bit more real estate when you're working with it.
2:59 And then just close it when you're done. You can open up the other different shell types that you want.
3:05 So if I wanted to create a new one, I click bash. Or. Tmux. Goes ahead and does that. I can clear the terminal from here.
3:21 These are all the different terminal options, but essentially everything that you're used to doing in a separate app potentially on your operating system, you can do.
3:28 You can do this directly within Visual Studio Code via the terminal view in the bottom panel.


Talk Python's Mastodon Michael Kennedy's Mastodon