VS Code Shortcuts That I Would Teach Myself if I Had a Time Machine With Limited Fuel
Tags: webdev, vscode, productivity, tools
Published: 2020-07-22 14:26:28


— "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"

![Example gif](https://dev-to-uploads.s3.amazonaws.com/i/dknmw72cwqc9759p9mtz.gif)

— "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?"

![Example gif](https://dev-to-uploads.s3.amazonaws.com/i/6wjl0po3vjkg8h1onzot.gif)

— "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"

![Example gif](https://dev-to-uploads.s3.amazonaws.com/i/len0ga2b2jeu27xqvbmt.gif)

— "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"

![Example 3 gif](https://dev-to-uploads.s3.amazonaws.com/i/1o6ppe9fulerd7h5z51j.gif)

— "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"

![Example gif](https://dev-to-uploads.s3.amazonaws.com/i/8x29w73g654lo5omhzz5.gif)

— "I knew that one!"

— "Instead of scrolling so much, **use Control/Ctrl+G to go straight to the line you want**, do you copy?"

![Example gif](https://dev-to-uploads.s3.amazonaws.com/i/287qjeujlzkprorqrw0l.gif)

— "Roger that"

— "**Use Command/Ctrl+Shift+L** whenever you need to *select all occurrences* of some text

![Example gif](https://dev-to-uploads.s3.amazonaws.com/i/0t3jb9x2bfna6s47g1s7.gif) 

— "Handy! Next one please."

— "**Command/Ctrl+W closes** the current tab, **Command/Ctrl+Shift+T reopens** it"

— "The usual, nothing new he..."

![Example gif](https://dev-to-uploads.s3.amazonaws.com/i/rjao669s54wmblxnv9ec.gif)

— "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"

![Example gif](https://dev-to-uploads.s3.amazonaws.com/i/bpzaslxon2eoyaoctply.gif)

"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](https://github.com/forem/forem).

Gifs (with a hard G) were recorded with [Kap](https://getkap.co/) on a 680x416 size with 12 fps.

VS Code theme is [Cobalt2](https://github.com/wesbos/cobalt2-vscode) and the font is [Envy Code R](https://damieng.com/blog/2008/05/26/envy-code-r-preview-7-coding-font-released).

--- 

## Hey, let's connect 👋

[Follow me on Twitter](https://twitter.com/paladini_dev) 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 😄