20+ Pro VS Code Shortcuts to Supercharge Your Productivity
- November 8, 2023
- Posted by: MainInstructor
- Category: Go Java JavaScript VSCode
![](https://i0.wp.com/allprowebdesigns.com/wp-content/uploads/2023/11/1699460847_maxresdefault.jpg?resize=840%2C430&ssl=1)
Video Title: 20+ Pro VS Code Shortcuts to Supercharge Your Productivity
As software developers we spend most of our time in front for editor as something we use all the time we could benefit a lot from learning how to become more efficient with it you’re watching I’m the coding staff and today we’ll take a look at shortcuts for supercharging your focus while working
With vs code on a Mac let’s start by first understanding why we can benefit so much from learning some handy shortcuts every time we use the mouse instead of a shortcut we have to do several things first take out one hand from the keyboard second point at
Whatever you need to point which usually requires fine movements that take time third perform the action and fourth return your hand to the keyboard in this process you inevitably end up losing time and focus If instead you replace some of the things you do with the mouse with keyboard shortcuts you’ll probably
Become much more efficient and focused so now that we know why we want to learn this let’s dive right into it let’s begin with Basics and also the most used shortcuts the ones to move around the first ones that I expect everyone to know are the arrow keys if
You need to move close to where you are these are just fine let’s get more serious now what happens if you want to shum straight away to the beginning or end of the line you can do Command right or command left and if you do command up or command down you’ll immediately shamp
To the beginning or end of the file now here’s where things start to get more interesting many times we want to move inside the line we could perfectly do that with the keyboard using the arrow keys however there’s a much better way you can press option left or option
Right and you’ll move between different parts of the current line if you want to get even more granular you can do control option left or right to move between camel case Words which is useful if you want to move inside things with long names next there’s a neat little
Trick that a friend shared with me many years ago and I never stopped using since that day it is for jumping to the last edited line let’s say you’re writing some code on a certain line and then you have to go to a different part of the file to check something instead
Of scrolling back you can press command Zed to undo the last change which will in turn take you to the last line you edited immediately after you can press command shift set to redo the last change this will result in you being back in the line you had last edited
Without having to leave your hands from the keyboard in this part we’re going to take a look at how we can switch tabs windows and also how to control vs codes left pain the first shortcut and again this shouldn’t be any news to anyone is that pressing command tab allows you to
Switch between different apps I use it all the time to switch between BS Cod Lo the terminal and the browser that is running the app I’m working on next if you want to switch between different Windows of a specific app command plus tab won’t help you here because it will
Switch to other open apps what you need here is command plus tiller pressing that will allow you to cycle through all the windows of the current APP another very useful shortcut that I use all the time is command W to close the current Tab and command shift T to reopen it
This not only works on vs code but also in any application that has tabs such as your browser still talking about tabs another great shortcut is common shift opening craes or closing craes to move left or right through the open tabs again this works on vs code but also on any app
That has tabs to finish this section if you want to control vs code’s left paint visibility you can press command B this is especially use for when you’re working on a smaller display such as the one on your laptop and you want to make some extra room for your
Code let’s begin with one of the most useful shortcuts in vs code it’s command D and it allows selecting multiple instances of the same thing for example let’s say I want to change all the places in which I’m doing prevent default and instead do stop propagation
I can use command D to select all the appearances of prevent default and change them all together in one go don’t forget to press Escape once you’re finished otherwise you’ll keep on editing multiple lines at the same time while you’re selecting things with command D you might select more things
Than you wanted in that case you can press command U to deselect one by one in some cases you want to select all the content in one file to do that just press command a this also works on any application in which you’re writing text such as Google Docs your browser your
Email app or many others to finish this section let’s take a look at something super useful to select any piece of text if you press and hold shift you can then move the cursor around and you’ll select anything between the starting and ending position you can combine this with all
The shortcuts in the first section to select text very effectively and even if you want to use the mouse if you hold shift and click on any other part of the document all the text in between will get selected in this section we’re going to take a look at shortcuts for navigating
The codebase let’s start with the first one if you have an open file and you want to jum to a specific line you can press contrl G write the line number and press enter and you’ll jum right away to that line now if you want to open any
File on your project it’s not necessary to search for in the file explorer you can just press command p and type not even the full name but just parts of it and press enter for landing right away into that file here for example just writing HTML or css allows me to open
The files that I want let’s say that now you’re on a specific file especially a long one if you want to shamp to a specific variable method or even test case then you can press command shift o right part of the name and press enter and you’ll jum to
That specific part of the file again you don’t even have to write entire name here just writing up lets me shamp to the update pending function if you want to take this even further you can press command T and you’ll be able to shum to anything defined in your entire code
Base for example here I’m working on index CSS and I can jump directly to delete clicked element even though I’m not with that file in the forr take into account though that this functionality might depend on the language you’re using for example if you’re using Java Script it will search
Only in the files that are currently open whereas if you’re in typescript it will work with any file no matter if it’s open or not if you want to search something in the current file you can press command F and if you want to search in all your codebase you can
Press command shift F also take into account that if you have something select and you use any of these shortcuts you won’t even have to write what you’re looking for since the selected text will be used at the search finally if you want to navigate to a specific symbol you can press
Command and click on the symbol I know that this uses the mouse but it’s really really useful again if you’re working with JavaScript it will only work with open files but in typescript it will be able to navigate to any file in your cepas now we’ll take a look at shortcuts
Specifically designed to make everything simpler let’s get started with the first one if you want to rename a symbol you can press f2 and write the new name and Bs code will change it everywhere take into account that if you’re working with JavaScript it will change it only inside
The file you’re working with whereas in typescript or other type languages it will be changed in all your codebase this is invaluable when you’re ref factoring your code to make it cleaner next if you want to delete the line in which you are currently standing just press command shift K and it will
Go away I use this all the time which is much simpler than selecting whatever I want to delete and then deleting it the following one allows you to slide a line up or down which is something that may sound silly but pay attention and you’ll realize this is something that you
Probably do more often than you think to move the line you can do option app up or down arrow also if you add shift to that you’ll copy the line up or down instead of just sliding it if you want to toggle a comment on a
Line you can press commment slash and if you want to do the same on multiple lines you can just select all of them and use the same shortcut the last one in this section allows you to open the code actions dialogue I find it really useful for things like Auto importing a dependency
For example here the vector class is not defined so I can just position the Cs on it and press command plus Dot and I’ll get a bunch of options among which I can choose to autoimport the vector class great so this leads us to the sixth and final part of this
Video in this last part we’ll take a look at some final tips that will help us learning new shortcuts the first one is that if you find out that you’re using something quite often and you want to quickly check if there’s a shortcut for it you can usually get a hint of the
Shortcut by hovering the mouse for example let’s say I switch between the Explorer and the source control tabs quite often and I want to use the keyboard to switch I can hover with the mouse on the tabs and it will show me the keyboard shortcuts the same works
For menus there are many things that have a shortcut and when there is one it is displayed right next to the menu option the last thing I want to show is a very important command in PS code all the available commands are accessible by pressing command shift p if you press
That and type what you want to do you’ll not only be able to do it but also if there is a shortcut for that it will be displayed right there let’s say for example I want to command the current line I can press command plus shift plus
P and start writing comment and I’ll get the option to comment the code in drop down that appears moreover I will be able to see what’s the shortcut free so there you go these are all the shortcuts I use to make my life easier and to be more effective while I do my
Shop I hope you find them useful too and start getting used to working with them see you next time
Video Keywords: VS Code, [vid_tags]
-
Sale!
Wireless WIFI Repeater Extender Amplifier Booster 300Mbps
$29.99$14.99 Add to cartWireless WIFI Repeater Extender Amplifier Booster 300Mbps
Categories: Electronics, Wi-Fi Router, Wireless Wi-Fi Extender Tags: 300Mbps, 802.11N, Amplifier, Booster, Extender, mobile wi-fi booster, Remote, WIFI, Wireless, Wireless WIFI, Wireless WIFI Repeater, Wireless WIFI Repeater Extender, Wireless WIFI Repeater Extender Amplifier, Wireless WIFI Repeater Extender Amplifier Booster, Wireless WIFI Repeater Extender Amplifier Booster 300Mbps$29.99$14.99 -
Sale!
Full RGB Light Design Gaming Headset Headphones with Mic
$24.99$14.99 Add to cartFull RGB Light Design Gaming Headset Headphones with Mic
Categories: Electronics, Gaming, Gaming Headsets Tags: Design, Full, Full RGB Light Design Gaming Headset, Full RGB Light Design Gaming Headset Headphones, Full RGB Light Design Gaming Headset Headphones with Mic, Gamer, Gaming, Gaming Headset Headphones, gaming headset wireless, Headphone, Headphones, Headset, Light, Mic, Package, RGB$24.99$14.99 -
Sale!
Wireless BlueTooth Multi-Device Keyboard Mouse Combo
$39.99$19.99 Add to cartWireless BlueTooth Multi-Device Keyboard Mouse Combo
Categories: Electronics, Gaming, Gaming Keyboards, Keyboard Mouse Combos Tags: Combo, Keyboard, keyboard mouse combos, Mouse, MultiDevice, Set, WireKeyboard Mouse Combo, Wireless, Wireless BlueTooth Keyboard Mouse Combo, Wireless BlueTooth Keyboard Mouse Combos, Wireless BlueTooth Multi-Device Keyboard Mouse Combo, Wireless BlueTooth Multi-Device Keyboard Mouse Combos$39.99$19.99 -
Sale!
High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar
$199.99$139.99 Add to cartHigh Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar
Categories: Gaming, Gaming Chairs Tags: Adjustable, Chair, computer chairs, Desk, Executive, Gaming, Girl, Headrest, High, High Back Leather Executive Adjustable Swivel Gaming Chair, High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest, High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar, High Back Leather Executive Adjustable Swivel Gaming Chairs, Leather, Lumbar, Office, Racing, Swivel$199.99$139.99 -
Sale!
Professional LED Light Wired Gaming Headphones with Noise Cancelling Microphone
$29.99$19.99 Select optionsProfessional LED Light Wired Gaming Headphones with Noise Cancelling Microphone
SKU: N/A Categories: Electronics, Gaming, Gaming Headsets Tags: Cancelling, Gaming, Gaming Headphones with Noise Cancelling Microphone, gaming headset, Headphones, Headset, LED, Light, Mic, Microphone, Noise, Professional, Professional LED Light Wired Gaming Headphones, Professional LED Light Wired Gaming Headphones with Noise Cancelling Microphone, Wired, Wired Gaming Headphones, Wired Gaming Headphones with Noise Cancelling Microphone$29.99$19.99 -
Sale!
Gaming Desk with LED Lights USB Power Outlets and Charging Ports
$349.99$249.99 Select optionsGaming Desk with LED Lights USB Power Outlets and Charging Ports
SKU: N/A Categories: Computer Desk, Gaming, Gaming Desk Tags: and Charging Ports, Charging, Desk, Desks, Gaming, gaming desk with led lights, Gaming Desks with LED Lights, Home, LED, Lights, Monitor, Office, Outlets, Port, Power, Room, Stand, USB, USB Power Outlets, White, Workstation$349.99$249.99 -
Sale!
Wired Mixed Backlit Anti-Ghosting Gaming Keyboard
$99.99$79.99 Add to cartWired Mixed Backlit Anti-Ghosting Gaming Keyboard
Categories: Electronics, Gaming, Gaming Keyboards Tags: Antighosting, Backlit, Blue, brown, Gaming, Gaming Keyboard, gaming keyboards, gaming keyboards and mouse, Keyboard, Laptop, Switch, Wired, Wired Mixed Backlit Anti-Ghosting Gaming Keyboard, Wired Mixed Backlit Anti-Ghosting Gaming Keyboards, Wired Mixed Backlit Gaming Keyboard$99.99$79.99 -
Sale!
Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset
$119.99$59.99 Add to cartWireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset
Categories: Electronics, Gaming, Gaming Headsets Tags: 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset, ANC, Audio, Bluetooth, Cancellation, Ear, Earphone, gaming headset, Headphones, Headset, Hi-Res Over the Ear Headphones Headset, HiRes, Noise, Wireless, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Headphones, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headsets$119.99$59.99 -
Sale!
Wired Sports Gaming Headset Earbuds with Microphone
$19.99$9.99 Select optionsWired Sports Gaming Headset Earbuds with Microphone
SKU: N/A Categories: Gaming, Gaming Headsets Tags: Accessories, Earbud, Earphone, Earphones, Gaming, gaming headset with microphone, Headphones, Headset, IOS, Microphone, Sports, Wired, Wired Sports Gaming Headset Earbuds, Wired Sports Gaming Headset Earbuds with Microphone, Wired Sports Headset Earbuds$19.99$9.99 -
Sale!
150W Universal Multi USB Fast Charger 16 Port MAX Charging Station
$49.99$29.99 Add to cart150W Universal Multi USB Fast Charger 16 Port MAX Charging Station
Categories: Charging Stations, Electronics Tags: 150W, 150W Charging Station, 150W Universal Multi USB Charging Station, 150W Universal Multi USB Fast Charger 16 Port MAX Charging Station, 150W Universal Multi USB Fast Charger 16 Port MAX Charging Stations, 150W Universal Multi USB MAX Charging Station, 16 Port MAX Charging Station, 3.5A, Charger, Charging, Fast, laptop charging stations, Max, Multi, Port, Stand, Station, Universal, USB$49.99$29.99
You should include the linux commands too. thanks