Become a VS Code Power User

User & Workspace Settings

Steve Kinney
Temporal
Become a VS Code Power User

Lesson Description

The "User & Workspace Settings" Lesson is part of the full, Become a VS Code Power User course featured in this preview video. Here's what you'd learn in this lesson:

Steve explains how to access and modify settings in Visual Studio Code. He discusses the different types of settings, including global, user, and workspace-specific settings. He mentions that extensions also have their own settings, which can be customized.

Preview
Close

Transcript from the "User & Workspace Settings" Lesson

[00:00:00]
>> Steve Kinney: There are settings. There are a lot of settings. The easiest way to find the settings is Command P on a Mac, or I think it's Control+p, I don't know, Windows. I can't even see them unless I go to my own notes, which feels like a little much.

[00:00:17]
The other way, of course, is.
>> Steve Kinney: To open your settings right with the command palette when in doubt, as one could scroll this and see that there are a lot of settings right. And that's great and wonderful. You can usually find. What I would probably do is search for whatever we're looking for.

[00:00:44]
If you're trying to change the font size, you probably know what you're looking for, so on and so forth. I think it's somewhat worth a tour at some point to go through all of them. That said, most of the sensible deep faults are sensible and seem good. Things I wanna point out though, as we kind of alleged with the extensions as well, is you've got your user extension.

[00:01:04]
So you've got the global extensions. These are the ones that are like the system defaults and you can see those at any point. And there's a reason why you'd want to, we'll do that in a second. Then you've got your user settings, which are your key bindings, your settings, right, which override that.

[00:01:19]
And then you can set workspace specific for a given project, and those will override yours. Now, this enters the greatest debate of all time. Do you check that into version control? The answer is it depends, right? If there are a bunch of settings for For that project you want everyone to be on the same page for, then yes.

[00:01:43]
The problem is on a workspace settings, it's not like you can have two sets of them. So it's either we're all doing this, or we're all not doing it. And I think there's, in terms of stuff like tab size and stuff like that maybe it makes sense. You can argue, just use prettier and who cares, or editor config.

[00:02:05]
It's I could go either way but yeah, the big question is not a should you or should you not. It is a kind of a team decision, right? Because the problem is, a lot of cases, you can make arguments especially for a lot of the editor settings on why that's useful.

[00:02:24]
On the other hand, all it takes is one person putting their silliest setting into version control, and now you have everyone's setting, yeah.
>> Speaker 2: Obviously people have different color preferences and brightness preferences and different font size preferences and all that. But is that something, if you wanted to do, you could put in get ignore or not?

[00:02:50]
Put in, get ignore. Does that even matter?
>> Steve Kinney: You doing it? Get ignore, but yeah, then nobody gets it right and for font size is a personal thing, but stuff for what files we wannna exclude from search?
>> Speaker 2: Yeah, okay.
>> Steve Kinney: Right? And so that's a trickier one.

[00:03:06]
Now, everyone either needs to set that setting because it's not in Version Control, or you put in version control, you know what I mean? And so, it's some settings, you can definitely see a world where everyone would want them if it's like hey, in this repo, there's a whole bunch of CSV files full of data that I never want to navigate to, right?

[00:03:22]
I want them excluded from search and I want them excluded from everything else. You can see a world where everyone wants that setting, but in terms of you have your peacock color for that workspace, I don't want your bright yellow. You know what I mean?
>> Speaker 2: Yeah.
>> Steve Kinney: It's tricky, yeah, it's a trade off.

[00:03:39]
I don't have a necessarily, right answer in any way, shape or form, right? What's usually useful too is, as you can see, all of your extensions also have settings as well, and so yeah, languages where Emmett should be expanded. Included languages where you put in stuff like if you use view and you want it supported in there, maybe it doesn't do that by default.

[00:04:08]
Maybe you have you also have handlebars and you want them support in there. That's just what we saw like what the keyboard bindings, hey only work in the editor focus this type of file. You're basically doing the same for Emmett in this case, so on and so forth, depending on what the given plugin is, things that you might want to tweak or change.

[00:04:31]
And some of these are the built in extensions. Some of these are the ones that we installed. Obviously, we're all looking for this one now and there are settings throw a ball with them. Yes, we're turning that on and when you turn on a setting that is differentiated from the defaults, you can see this little blue line in this case.

[00:04:53]
And I think you can, if you hit the at you can search for either what. Feature or I think you get modified, which will be all the settings that you have modified from the defaults. So if you wanna see where you have strayed in this case, you can, turn that on and see the settings that you have changed, which is useful if you're trying to track down.

[00:05:16]
Did you make something silly happen? Things that I like. I do like format on save, not format on paste, not format on keystroke on save. I personally do not like autosave either, right? Because sometimes I just want to go read the docs and I did not want that page saving.

[00:05:33]
And like Veet or whatever, recompiling it did not ask for that, did not want it. Other ones that I think are super useful is this one right here. I put this one in the notes too, this reveal if open. If you have a bunch of editor groups, you open the same file, you will end up two tabs with the same file.

[00:05:55]
I don't want two tabs with the same file, if it was open in this other editor window, just do that one. Do not make two tabs with the same file. That was one of those ones that was driving me nuts and I sat there and I just went through the settings to find the one, which is like, if that file is already open in a tab, just go to that tab.

[00:06:14]
Do not make more tabs with the same file. Do not ask me if I want to delete a file, I will probably regret that one.
>> Steve Kinney: Trying to think what the other ones that are like? I think, yeah, auto fetch the Git repos. Some prettier settings by default, in case there is no prettier .rc in there, which is.

[00:06:38]
Is I want commas after all the things in the array and I want my single quotes. And if there's a prettier RC, it will respect that but if I'm just editing without a prettier fox, I'm doing just something random, I will get some of those in there as well.

[00:06:52]
But yeah, like lots of little things that you can tweak you can see what you have and have not tweaked, so on and so forth. There are certain things that you can only do looking at the JSON itself, and it's a really powerful thing as well. So you see, llet's see
>> Steve Kinney: Open User Settings JSON, and you will see the JSON representation of all of your settings.

[00:07:16]
So theoretically I have settings sync on. But you could let's say we have the situation where we have a bunch of workspace settings, but we did not want to set them to Version Control for reasons. At the very least, you could put what the settings are, take the JSON.

[00:07:34]
Say, hey, paste this or whatever. Or do even some better build tooling around this, but these are all your settings represented.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now