Become a Wizard in Visual Studio Code (Mac)

erikzhao
4 min readAug 18, 2020

As a former student studying Business Administration, Microsoft Excel was everything. Yes it is a powerful tool used for macro programming and pivot tables, and if you knew how to use them you were considered good at it. But what made you a wizard was how fast you used Excel without the mouse.

You can be a wizard, too

Now that I am beginning to learn coding with Visual Studio Code, I was excited to see that there were keyboard shortcuts. You might be wondering, “Well that’s cool and all, but isn’t it better if you have codes that are neat? Or if they actually work?” Of course it is, but your experience in using VSC will dramatically improve, as the annoying misclicks will never be a problem for you. An accumulation of using shortcuts would save substantial time and energy. And since you’ll be coding away, you may as well implement these shortcuts to get used to them.

Be speed, be Lightning McQueen

Are you ready to be a VSC wizard? Are you ready for speed? I have compiled a small list of shortcuts I find extremely useful. This is definitely far from being the most comprehensive list of shortcuts and there are many shortcuts out there that will enhance your coding experience even more, but the shortcuts outlined below will definitely make your life easier as it has for me.

SHIFT + CMD + P

One of the well-known VSC shortcuts. It opens up the Command Pallete where you can do many tasks, such as opening a new file, new folder, new terminal, or changing theme and going to settings; essentially anything you can find or want.

CTRL + `

The code editor is always opened without the terminal. Tired of going up to View and then Terminal? This can help you open it as well. Much quicker way to access it!

CMD + B

Maybe your screen is small, or you just need more room to write code. Toggling the sidebar allows you to do so by minimizing the file structure on the left. Never wrong with more real estate for code!

CMD + SHIFT + E

Let’s say you toggled the sidebar and you want to switch focus to another file. By using this shortcut, you can use the up and down arrow keys to navigate the structure.

CMD + UP/DOWN

When you are toggled in the file structure, this shortcut let’s you open (down key) and close (up key) folders.

CTRL + ENTER

This shortcut let’s you open up a file from the sidebar and docks it on the side. So instead of replacing a file that’s already open on the editor, the file you want to open will appear right next to it.

CMD + 1/2/3/…

Did you know that you can have multiple files appear on the code editor? You can split your editor into two, three, four groups or however much you want! This allows for versatility and productivity in writing code, which is always a plus.

CTRL + TAB

Switching between tabs is hard to do especially if you have a lot open. For an easier and quicker navigation experience, this shortcut allows the user to look at a list of tabs by holding down the control button and selecting the tab by clicking the tab button. This is easier because instead of searching for the tab, the list shows you which tabs are open.

CMD + W

You know you’re going hard on coding when you have a billion tabs on the screen. Want to clear it out? Use this shortcut to quickly exit the tab you are on instead of hovering your mouse over the little X. Quick and easy!

CMD + SHIFT + T

Accidentally closed out on a tab? Need to make a quick edit on a tab you just closed? No worries! This shortcut opens the last tab that was closed.

CMD + LEFT/RIGHT

If you have a long line of code and you want the cursor to be at the end of the line, hold CMD and click the RIGHT button to reach to the end of the line. If you want to go to the beginning of the line, you click LEFT instead.

CMD + UP/DOWN

This shortcut will bring you up to the end of the file if you click the DOWN button and the beginning of the file if you click the UP button.

OPTION + UP/DOWN

Do you need to shift the code from one line to another? Put the cursor on the line and hold OPTION and click the DOWN button if you want to move the line down to a designated line number and UP button if you want to move the entire code upwards.

Again, this list is the basic set of shortcuts that will allow you to have a more enjoyable experience with VSC. Remember to always practice using your shortcuts!

--

--