Skip to main content
View on YouTube to comment and like!

Syntax Video

How I Set Up VS Code

Chapter 1 0:00

Intro

[Music] now I have a repo that lists all of my settings extensions and everything else on how I set up vs code so I'll link that down in the description one of the first things is as I set the font to Anonymous Pro and then for the theme I like this theme called just black it's a very high contrast theme with a very dark background so I really like that now you'll notice by default my setup is very minimal it's almost like Zen mode where I'm not showing a bunch of extra stuff CU I really want to just focus on the code that I'm writing so let's take a look at my settings Json file and I'm going to kind of point to the settings that create this layout the first setting here is disabling the status bar visibility so when the status bar is enabled it looks like this it's down here at the bottom there's a bunch of extra info that I don't really want to see all of the time so that's why I disable it now um You can toggle it on whenever you need it but I don't want to see it all of the time next up I put the sidebar on the right hand side so you press control uh command B that will

Chapter 2 0:13

Font

Chapter 3 0:17

Theme

Chapter 4 0:25

Editor Layout

Chapter 5 0:38

Hide Status Bar

Chapter 7 1:32

Tabs Hidden

Chapter 8 1:51

Snippet Suggestions Top

instance I want to do a console log I can just type log and then tab and that inserts the console log snippet and you'll notice that that snippet option is right at the top of that that suggestions list but if we disable this now if you go to do a snippet expansion it's not at the top and so you have to like arrow down to get to it so that's a really useful setting so that way you don't have to arrow down to get to those Snippets that you're using very often another setting I have is I disable the mini map so the mini map is this here that kind of like shows you your code Overview at a glance I I don't find it very useful every now and then I might need it if I'm in like a really big file but by default I disable it so it's not taking up any extra space now another useful setting is linked editing and you'll see this in an HTML file so let me create one really quick and let's say we have a tag so I'm going to create a little H1 that says hello world like this now notice as I navigate around whenever my cursor is on an opening tag the closing tag also highlights so that's one key

Chapter 9 2:22

Disable Minimap

Chapter 10 2:37

Linked Editing

benefit another thing is if I start to edit the opening tag the closing tag automatically updates so that's super useful especially like you know if you're renaming tags or kind of like moving things around um and it's just built into vs code so you don't need an extra extension for this you can just set this to True next up I'm going to run through some of my most used extensions here in vs code now I use a lot of extensions if you visit this git repo you can see the full list I'm just going to highlight some of the ones that I use most often and the first one is font size shortcuts so I present my code a lot and I want to be able to increase and decrease the size of my font without increasing and decreasing the size of the editor so by default in vs code if you don't have this extension whenever you press command plus or command minus it zooms in and out the entire user interface and a lot of times you don't want that because then it'll just like make your sign your uh sidebar really huge so with this extension now whenever your code is highlighted the command plus and command minus shortcuts only affect your code next up is prettier now

Chapter 11 3:12

Most Used Extensions

Chapter 12 3:22

Font Size Shortcuts

Chapter 13 3:52

Prettier

if I'm working in an established project it probably already has a prettier RC but sometimes I'm working on just like off files and I want to be able to format them so the pretti a extension is great for that so for instance this project doesn't have a prettier RC but I can press option shift F and that will just run prettier on this file so this is really great if like you paste some Json data and you need to format it or some XML data or something like that another extension I really like is code spell checker so this is great if you make a lot of typos like me and if you have a misspelling uh right inside of your editor you can press command period and that will bring up all of the suggestions to fix it so super useful this next extension is a must if you work with typescript and it's called pretty typescript errors so if you're in a typescript file and you come across some type error usually it's just a whole lot to parse and a whole lot to figure out but pretty typescript errors makes it much more readable and kind of allows you to pinpoint the exact error more easily so once we enable this extension now when I hover over you'll notice that instead of just this blob of

Chapter 14 4:16

Code Spell Checker

Chapter 15 4:29

Pretty TypeScript Errors

text we have a nice readable and also syntax highlighted uh error message that gives me a much better idea of how to fix this type error this next extension is for making HTTP requests inside of vs code now you might be used to using a separate tool like insomnia or Postman but it's really nice to have this built right in in the sidebar here so I can press command shift r that opens up thunder client and then I can create new requests you can also see your history of requests so if I click on these then that'll automatically load up the body and the headers or anything else that I had set it's right there in my history and it works just like those other tools so you can send these requests you can change HTTP method all that good stuff um and then another extension that works really well in conjunction with this especially if you're in a typescript project is paste Json as code so let's say I made this API request which gives me back some Pokemon data and I want to create a typescript type from this data I can just copy that data and then over here in my typescript codes we can generate a type so if you press command shift p

Chapter 16 5:02

Thunder HTTP Client

Chapter 17 5:32

Paste JSON as Code

search for paste Json as code give it a top level name in this case it's a Pokemon this will then generate a typescript type using that Json data so this is super useful especially if you're just like using fetch in your codes and you want to get some good type completion you can generate the type and then just import it in that's it for the extensions I use the most uh the rest of these extensions are specific to languages and Frameworks so depending on what you do in your data day job you may or may not get some use out of these but XML tools is really great if you work with XML and you need to format it or if you're working like with configuration files that are XML Tailwind is essential their their extension is if you work with Tailwind daily it gives you good editor support you can hover over the tail and classes and it'll show you exactly the CSS that's being applied also if you're working in react there is an extension that gives you a bunch of Snippets and depending on the type of styling solution you're using in your react projects there are a set of extensions that will give you much better editor support if you're working in view volar is the way to go there's the spelt extension if you're working in spelt or spelt kit the Prisma extension

Chapter 18 6:08

Language / Framework Specific Extensions

is great for giving you Auto formatting syntax highlighting and autocomplete and then the H HTM X extension is great to also give use some autocomplete on those HTM X tabs so these are all these extensions if you have any suggestions for things that I missed and that I might like to use definitely let us know down in the comments and if you found any use out of the ones that I mentioned let us know as well [Music]

Chapter 19 7:02

Thanks!

Quote it with credit and a link. Quoting Syntax