---
title: 'VS Code for Beginners: The Ultimate Collection of Tips & Tricks'
source: 'https://youtube.com/watch?v=5X8P66g1yfw'
video_id: '5X8P66g1yfw'
date: 2026-08-02
duration_sec: 1055
---

# VS Code for Beginners: The Ultimate Collection of Tips & Tricks

> Source: [VS Code for Beginners: The Ultimate Collection of Tips & Tricks](https://youtube.com/watch?v=5X8P66g1yfw)

## Summary

This video is a beginner-friendly guide to Visual Studio Code, presenting a collection of tips and tricks to enhance productivity. The presenter demonstrates how to open projects, use keyboard shortcuts, edit multiple lines simultaneously, leverage built-in features like Emmet and snippets, and integrate Git, all aimed at helping viewers use VS Code more efficiently.

### Key Points

- **Opening Projects in VS Code** [00:02] — Use the terminal command 'code .' to open the current folder in VS Code. If the command isn't recognized on macOS, install it via Command Palette (Shift+Cmd+P) and selecting 'Shell Command: Install code in PATH'.
- **Keyboard Shortcuts Reference** [01:25] — Access a printable keyboard shortcuts reference via Command Palette (Shift+Cmd+P) and typing 'keyboard shortcuts'. This provides a list of shortcuts for your specific OS.
- **Quick File Navigation** [01:59] — Use Cmd+P (Ctrl+P on Windows) to open the file search. Type a filename to jump to it. You can also navigate to a specific line by typing ':' followed by the line number (e.g., ':38').
- **Navigating to Symbols** [02:53] — Use Cmd+P and type '@' to list all functions, methods, and symbols in the current file. Select one to jump directly to its definition.
- **Multi-Cursor Editing** [03:20] — Use Cmd+D (Ctrl+D on Windows) to select the next occurrence of the current selection, allowing simultaneous editing. Alternatively, use Alt+Click (Option+Click on Mac) to place multiple cursors manually.
- **Column Selection** [04:33] — Hold Alt+Shift (Option+Shift on Mac) and drag to select multiple lines vertically, enabling you to edit several lines at once, useful for CSV files or adding spaces.
- **Rename Symbol** [05:30] — Use 'Rename Symbol' (F2) to rename a variable or method across the entire project safely, updating all references without affecting unintended occurrences.
- **Cut, Copy, and Move Lines** [06:08] — Use Cmd+X (Ctrl+X) to cut the entire line without selecting it. Use Alt+Up/Down (Option+Up/Down) to move a line of code up or down.
- **Commenting Code** [07:15] — Select code and press Cmd+/ (Ctrl+/) to comment or uncomment the entire selection quickly.
- **Tab Management** [07:42] — Use Ctrl+1, Ctrl+2, etc., to switch between tabs. Pin tabs by right-clicking and selecting 'Pin' to keep them open even when closing others.
- **Navigate Back** [08:50] — Use Ctrl+- (Cmd+- on Mac) to jump back to the previous cursor position, useful for navigating between files.
- **Code Snippets** [09:16] — Type a snippet prefix (e.g., 'switch') and select the suggestion to auto-generate code. Create custom snippets via Command Palette > 'Configure User Snippets'.
- **Emmet** [10:52] — Use Emmet abbreviations in HTML files to generate markup quickly. For example, type 'html' and press Enter to create a basic HTML structure, or 'li*5' to create five list items.
- **Creating Files with Nested Folders** [11:59] — In the Explorer, right-click and select 'New File', then type a path like 'model/weather.cs' to create the folder and file simultaneously. Use Cmd+N for a new file, and set a default language via settings.
- **Command Palette and npm Scripts** [13:57] — Use Cmd+Shift+P to open the Command Palette. Type 'npm' to see options like 'npm run script', which lists all scripts in package.json for easy execution.
- **Integrated Terminal** [14:28] — Open the integrated terminal with Ctrl+` (backtick). You can have multiple terminals, split them, and switch between different shells like zsh or PowerShell.
- **Git Integration** [15:25] — Use the Source Control icon to manage Git operations via a UI. You can stage, commit, and push changes without using the command line. The GitLens extension adds inline blame annotations.

### Conclusion

The video provides a comprehensive set of VS Code tips and tricks that are essential for beginners to improve their coding efficiency. By mastering these shortcuts and features, users can significantly speed up their workflow and make the most out of the editor.

## Transcript

going to show you a few tips and tricks that i picked up along the way to get you using vs code like a pro so the first thing i want to show you is how to open up your project in vs code and obviously you can just go down and
on the terminal i know it's probably the quickest way to do it um so let's say you're going to create a new project so let's create new test proj new folder now there's a couple of ways
we can open this up we can do code test proj into that new folder
just doing code dot now bs code is opened up and you can start writing code for a new project if you're on a mac like me and that last command didn't work to open up code and
that's because it's not on your path and what you can do to do that is to shift command p which will load up the command palette and then type in shell and you command in path click that and you should get a nice
message so it's been successfully installed so next time you go and try installed so next time you go and try that command it should work pro then you need to learn the keyboard shortcuts
which you can even print out if you want to and you do command shift p this loads up the command palette from there you can do keyboard shortcuts by typing in shortcuts and you'll get a help keyboard shortcuts reference link there and
press enter that'll load up the keyboard shortcuts for your frozen system so in my case it's a mac but for you it might be windows and one of the things i'll show you first is how to quickly find a file so
if you do command p or control p if you're on windows this will load up the search files window so there you can type in we want to go to i've got a weather
through and find particular file results and and go down and go to the one you want to so let's go to the controller scroll up here so here you've got the um file all opened if you want to go to a
particular line and you can do command p again and in this case we're going to do and then type the line that you want to go to now this is particularly useful if you've got a really long file um so let's just say we want to go to line 38
press enter and your cursor will now be online 38 another cool feature you can do to help you go through the code is again command p this time we're going to do the at symbol
the various functions that we've got in this um functions and methods and names that we've got inside this controller um so if you want to go to a function obviously we've only got a get function in this one we're going to get async
and that will take us to this get method so vs code lets you edit multiple things at once and there's a few ways of doing that so let's say we've got weather response here now when you double click on
for you every single place where that text appears but actually it's possible to edit all of those at once so if we do command d or ctrl d on windows you can see as i click through it's going to highlight
items from there if we start typing we will actually edit all of these at once which is pretty cool another way that you can edit multiple things at once is to use the
um alt click if you're on windows and this lets you place your cursor in multiple places um so let's say we want to add a comment at the end of each of our our lines of code
to hold down option or alt and then click on all the other lines of to and then from here we can just start typing and it's going to edit in all the places
need to update a bunch of things at once in different places in your code one thing i do particularly like doing is being able to update is being able to update uh several lines at once um so
if you do alt shift or option shift you can actually drag your cursor down um so we pick here we can drag this down hold down alt shift and then drag down the cursor and then we can add in like multiple spaces or whatever you
want to do can be done you can even um particularly if i'm editing a csv file you can edit multiple lines at once while we've got the cursor there the other thing you do is obviously you can
go through with the arrow keys a character at a time what's more useful is again if you hold down option you can actually jump to the end of each and goes through and jumps to those particular points
so previously we edited the response word there and there's a better way of multiple references or something throughout your code so let's say we wanted to edit this get weather async method um
there's a great thing you do here it's called rename symbol so this is going to link through all the references in your code and using that it's going to rename so this is much safer to do than say a find and replace
which might end up editing something you don't want this will only edit this particular method let's call it get weather async or get get weather now i think um now it's gone through and you can see
up here in the unsaved openness it doesn't save it but this has gone and updated the weather client it's updated the forecast with the new method name
another cool thing you can do is say you want to cut a line out your code um once you know that control x will do a cut or command x if you're on on a mac and we can take this whole line out you don't
copy the whole line you can let you just have your cursor on it do command x and um and obviously you can then paste that where you want it um down here for some reason you can put that in
move around a particular line of code and key and then use the arrows and this will move that line of code around for you now one thing i find
myself doing especially if i'm trying to debug something or i'm making something you know obsolete is section of code and obviously you can do this just by
putting in your comments um for each line and that's a bit slow um or obviously you can do the the shift option or shift alt thing go through and select it but actually there's a shortcut for it now
if you select what you want to comment out you can do command forward slash and that will do a complete section for you you can just do that while you want because it's on the line
especially at work i'll have 20 million tabs open i find that on the same visual studio code when i'm working on a project i'll have 10 20 different tabs open all pointing to different things now visual
studio code gives you a great way to navigate between all those tabs and so let's open up a few more things and i'll show you what i'm talking about one of the things you can do to navigate between all these different tabs is to
use control and number now this should work on both windows and on a mac so if we want to go to the first tab to and same for the others control two control three control four
tabs is to be able to pin them so say there's open the way we do that is you right click on a tab and you can see down here we've got the option to pin it
and now what that means is that it will always be there um so if we were to do here and do close all then we still keep our pin tab open um so it's great thing to just keep those
windows there if you want to close a tab that's been pinned and you need to unpin right clicking on pin and then it will allow you to close it now one thing that i find is that i'm often jumping around pieces of code
so say we started on our startup page then we want to go back to where we were previously and now you can do that by pressing ctrl minus and that will jump straight back
worked on and now you can keep doing this and points which is really cool one feature i use quite a lot is code so the way this works you can basically
type in a bit of code and then it will auto complete what you want to type in statement um so let's type switch and now you can see here the the second option um it's a switch statement if you click
on that actually auto generate the the main part of your switch statement for you and this works with a lot of different methods now you can write your command shift p
and we type in snippets and we can do configure user snippets now there's a global snippets file that works across all instances um or there's one specific to the project that you're working on
snippets file here and you can call it what you want i'm just going to call it what you want i'm just going to call it snippets for you and so it already comes with code ready for you to
console example um so first we're just gonna uncomment all of this now this particular example is obviously for javascript and typescript and you can change the
language scope that you want to use and edit it to what you want i must admit i haven't written many of these snippets myself what i tend to do is go to extensions and from there if you just search for
snippets you can then find snippets for all of the top languages and save you a lot of time in and write your own ones html one really good inbuilt feature of vs
code is something called emit now i think this used to be an external plugin but now they've basically built it directly into vs code now the way this works is we've got html page here and we want to fill it out so
what we do is we'll type html and you can see here we've got an abbreviation now you can just click enter and that will fill out the tags but let's say we want to go a bit more so let's say we want a body
on a biddy a body with um with um a div inside it a nested div for you now let's say we want uh another div
with an unordered list and you can do li time x5 and that will create five of them for you like that so it's really powerful and it saves a lot of
time if you're writing html one thing when you're coding that you're creating new files so we can do that really quickly in vs code so if we right click and do a new file
obviously you can type in a new file but say we want that in a nested folder but we can actually type model followed by forward slash and then say let's say weather dot cs and you see that's created our model
folder as well as our our weather file this works with multiple nested folders so let's do new file i'm going to type folder and then nested folder
let's call it nested nested and then file.json structure as well as our file inside there now another way you can do new files is by doing command n
to load up a new window but you can see here that it's just a plain text file constantly working with c sharp or another language and you want the new files that you create to be in the same language there is a setting for that if
we go command shift p load up this and then type in settings we can open up our settings file and then the setting you need to add in and then the setting you need to add in is files dot default language
the default language if we do command space it will autocomplete and in this case we want to have active editor language now if you language you might just want to set that explicitly
but this will use the language that you're currently using on your page so let's get rid of our new file go back to our controller and do command n again and now you can see we have a c sharp file rather than a
plain text file so one thing that we've used a lot already but already talked about is the command palette so this is control shift p or command shift p on a mac and here you can search for and execute
a lot of the commands that are built into vds code one really cool feature if you're working on a react project or a node project in general is type in npm and here you can see a bunch of options for node but if we do npm run script at
this will show all of the options that are in your package.json file instead of having to run them on the command line one of the most useful terminal we can get to that by doing control
factic you can see here i'm using zsh as my terminal on a mac um but i can also load up other terminals you can see how i'm and i'll load up multiple terminals and switch between them this is really
running in the background but you also need to run as something else and alternatively you can see the other types of terminals that are available to so this will be different if you're running on a on windows as you might
have power shell here for example and we can also you can see this little window this little icon here and that allows you to split up your terminals you can see both of them at once another cool feature that i find myself
using quite a lot especially on c-sharp projects is to be able to click on a folder and then one here do open in integrated and that's great way to just quickly jump to a particular part of your code
lastly one really cool integration with vs code which makes it really useful is it's git integration so you can see here we've got the source control icon it
gives you a great ability to use the functionality of git without so yes you can type them straight in on the terminal so we go back to our main folder here
and we can type git status and it will tell us that sort a nice ui so let's just edit this file so let's just edit this file i'm just gonna
don't load up straight away uh sometimes i don't you can click the refresh button and that will find your your files it's the same thing as typing git status on the command line um but it just gives you a nicer ui and
it's much easier to add and remove files that you need to um another cool feature is if you use the particular things maybe you want to publish a new branch
or add a new remote all of the commands that you would normally use in git are all here via the ui so it's much safer to use these and it is to you online and get it wrong
now one extension that i really like which works with git is called git lens so we search for kit lens in extensions kit now what this does it gives you a lot of
really great functionality directly inside your code base if we go back to our file we can see here on the current line you're on it will tell you who edited that file when it was edited and the
and if you hover over that it will give you further details um so you can even you further details um so you can even go to git hub and see the the commit there i hope you like this video on vs code
tips and tricks this is only my second video on youtube so please hit like and subscribe to help this channel out thank you
