How to Use VS Code Like A Pro [For Mac Users]Mar 10, 2023
Ever pair with a developer who has no knowledge of the code editor they are using? No? Well, my friend you may be that developer.
I certainly was.
I had been using Visual Studio Code (no, not VSCode 😉) for a couple years and had recently switched to a startup where most of the devs were using VSCode.
I was pairing with a super-senior engineer on the team on my first day. Things were going… not well.
He was visibly frustrated and after about an hour of pairing he cut our session short.
“Hey, I’m going to send you a set of commands I use for VS Code and I want you to get familiar with them” he said, matter of factly.
Years later, I now feel his pain. So much of writing code for larger applications is being efficient in finding code, moving blocks of text around and leveraging the tools to do repetitive tasks.
Struggling to find files or wasting time with the intricacies of your editor wastes time and makes the experience of pairing feel tedious or at worst, painful.
Behold! The shortcuts you NEED to be using in VSCode
The Basics (… you’d be surprised)
Cmd + c
Cmd + v
Cmd + s
Search for text within all files:
Cmd + Shift + f
Search for a folder/file using regex :
Cmd + p
Go to a specific line number within a file:
Ctrl + g
Move a line of text/block of text up or down:
Opt + arrow up || arrow down
Select multiple instances of the same text:
Cmd + d (do this multiple times to continue selecting more instances)
Split screen vertically:
Cmd + \
Split screen horizontally:
Cmd + Shift + \
Close a window:
Cmd + w
Cmd + n
Open integrated terminal:
Option + `
Open keyboard shortcuts:
Cmd + k + s
See that last shortcut above 🔼 ? You can change the key bindings by opening the keyboard short cuts and use your own special incantation to create the key combinations that make sense for you. For example I toggle my file explorer by using
Cmd + 1 🤷♂
These shortcuts may seem trivial but they will increase your productivity or at least make you much more enjoyable to pair with 😅.
Grab my Ultimate JS Developer Kit
Learn unit testing, how to fix your LinkedIn to stand out, DSA and a hell of a lot more.
I hate SPAM. I will never sell your information, for any reason.