Yes, there’s more to life than
control + c and
control + v …
I remember starting my coding bootcamp journey wide-eyed and excited about all the new things I was going to learn! One of these things was learning how to use VSCode efficiently, which is an art in itself. My advice? Practice these shortcuts early and often! I know it can feel like extra work or something you can learn later, but trust me, the earlier you can practice these and get them down, the faster you will be at writing and editing code. I had a sheet of paper with these shortcuts written down at my desk and would reference it often. It will come naturally sooner than you think!
Here we go!
Beginner’s VSCode hotkeys for macOS that I find particularly useful:
command + shift + k Delete a line
command + / Comment out the whole line
command + d aka the Multicursor. This allows you to select the same word multiple times and edit/delete them all at once. Highlight the word and use this command for each of that same word you want to edit. Once they are all highlighted, you can start typing and it will change the words all at once!
option + up arrow or down arrow Move a line up or down
option + shift + up arrow Copy a line up
option + shift + down arrow Copy a line down
control + ` Open your terminal in VSCode
option + left arrow or right arrowMove your cursor by each word
command + | (the pipe underneath your
deletekey) Split a window with the same file
control + c Shut down server
command + c Copy the whole line of code (you don’t need to highlight it)
Hopefully I’ve provided a good starting point for those of you beginning your coding journey. Best of luck!