— "Hey, it's me. Listen up, I don't have much time."
— "Wait, what?! What is happening?! Who are-How did you get in my house?! Wh-why do you look so much like me?!"
— "I am you, you dum-dum. I came from the future specially to teach you some VS Code shortcuts. Now..."
— "Wait. Are you serious? You could've brought back lottery results, stock market data, but you came all the way here to teach me freaking VS Code shortcuts?!"
— "Listen, I really don't have much juice left on this thing... Just sit and pay attention please, this is impor..."
— "Couldn't you have written these shortcuts, you know, on a piece of paper?"
— "Shut up! This is important!"
— "Okay, okay..."
— "So, you should stop clicking for files in File Explorer and start using Command/Ctrl+P, then type the file name. Add :N and it will open exactly at that line number"
— "Ooooh, we have hologram gifs in the future, nice example"
— "I know, right? Also, stop navigating the File Explorer with your mouse altogether and just use Command/Ctrl+Shift+E and arrow keys, ok?"
— "Ok, cool..."
— "Now, if you ever need to focus on the panel again, instead of clicking the edit area, just press Command/Ctrl+1 and it will focus the first open panel"
— "Cool, cool cool cool cool cool no doubt"
— "Use Command+Shift+[ and ] to navigate through file tabs, try Alt+Left and Right if you run Windows in this timeline. This will save you a lot of time"
— "Hard to think of it as a lot of time but, yeah, okay… You're the one with the time machine"
— "Use Command/Ctrl+B to toggle the editor sidebar, it will save you some space when coding on small screens"
— "I knew that one!"
— "Instead of scrolling so much, use Control/Ctrl+G to go straight to the line you want, do you copy?"
— "Roger that"
— "Use Command/Ctrl+Shift+L whenever you need to select all occurrences of some text
— "Handy! Next one please."
— "Command/Ctrl+W closes the current tab, Command/Ctrl+Shift+T reopens it"
— "The usual, nothing new he..."
— "Wait, I have to return now. Command/Ctrl+Shift+H is Find & Replace, you'll always forget this one, don't be too hard on yourself"
"Wait! I have so many questions! How did I even get a time machine? Does this creates a new parallel universe? Will 49ers ever win the Super Bowl again? Hey, wait! Waaait."
EDIT: There is a whole lot of great shortcuts in the comments, you definitely should check them!
Repo in the examples is forem.
Gifs (with a hard G) were recorded with Kap on a 680x416 size with 12 fps.
VS Code theme is Cobalt2 and the font is Envy Code R.
Hey, let's connect 👋
Follow me on Twitter and let me know you liked this article!
And if you really liked it, make sure to share it with your friends, that'll help me a lot 😄









Latest comments (46)
I would rather tell my past self to learn Vim at the age 14. I use VSCode sometimes so it's still good to learn some nice commands though!
Alt+1, Alt+2, Alt+3 ... also work for focusing tabs. It also works in Chrome (both Ctrl+digits and Alt+digits), Firefox (only Alt+digits) and gnome-terminal (only Alt+digits), making this the one shortcut to remember! [Linux]
Nice post and nice replies. I'll also add some shortcuts I'm using and I didn't see here.
SHIFT+ALT+iwill create multicursor. ThenCMD+LEFT/RIGHTto go to the beginning/end of the lines.CMD+P. Then>to see the latest command, or:to jump to specific line. For example, if I have some text I want to uppercase it, I select the text,CMD+P, then type>and start typing uppercase. You will see aTransform to Uppercasecommand :)Is there a shortcut for creating a new file in the explorer SIDEBAR? I always have to right click first and then use my mouse to do this.
Control-Shift-P (or Command-Shift-P) is the "master key" which shows your most recent commands, and allows you to search for any other command, including keyboard shortcuts - learn this one first, and then gradually you'll learn the rest ...
Control-Q is also one I use a lot - switching between the Explorer view, the Source Control view and the Debug/Run view.
Ah and then Control-] or Cmd-] (on OSX) to jump to end bracket/begin bracket is a powerful one.
CMD + ] on my Mac causes the line to indent (like using TAB) rather than jumping to brackets. I wonder if you have mapped your hot keys differently.
Ah yes maybe I remapped it, some key combos are unintuitive or conflict with other things so then I'd remap them.
In my vscode, I use
Ctrl+Tabto navigate between tabsFunny and so helpful! Thank you and thanks to all the add'l added in the comments! I have a lot of muscle memory learnin' to do.
Thanks, Shane! I'm very happy with all the comments, I learned quite a few new shortcuts as well 😄
My favorite is
Ctrl + Dto select Next occurrence. And hold ctrl key for using multi cursor.You are so funny. Thank you for this!
You're welcome, Elliot 😄
I wish I could write like this every time but I have to be particularly inspired to come up with something this silly haha
This is a great list! I Found myself referring back to this after reading it a few days ago :)
Quick observation:
For me (I've made no edits that I can recall) this closes all "except" the current tab. And then pressing it again re-opens all. Did you customize this setting?
That seems like specialized behavior, @Gio.
The default on VSCode (as well as most browsers and operating systems) is that CMD + W closes the current window.