DEV Community

Cover image for Get Faster - VSCode navigation without a mouse

Get Faster - VSCode navigation without a mouse

Vaidotas Piekus on May 26, 2020

Motivation Why should you care about mouseless experience when VSCode is a GUI editor tuned to a great mouse experience? The answer is s...
Collapse
 
slushnys profile image
Zigmas Slušnys

I got used to navigating methods with shift+cmd+.
It opens all the methods within classes in file and let's you search. Most valuable thing for me honestly.

Collapse
 
andreabarghigiani profile image
Andrea Barghigiani

This is nice too, thanks for sharing!

Collapse
 
murjam profile image
Mikk Mangus

I have my previous and forward set up the same way as in the browser which is super convenient and I could not do without it.

{
  "key": "cmd+[",
  "command": "workbench.action.navigateBack"
},
{
  "key": "cmd+]",
  "command": "workbench.action.navigateForward"
}
Enter fullscreen mode Exit fullscreen mode
Collapse
 
igormelo profile image
Igor Melo

Isn't ctrl tab easier?
Or they are different stuff

Collapse
 
murjam profile image
Mikk Mangus

The actions navigateBack and navigateForward are not about navigating between tabs, but within the code. I.e, if you open a file/function by Ctrl+clicking on it, you can "navigate back" :)

Thread Thread
 
igormelo profile image
Igor Melo

Oh, I see!
Its kinda of a cursor position history...
Very useful!

Collapse
 
waylonwalker profile image
Waylon Walker • Edited

In my first ever dev post I posted my tips on getting around vscode without the mouse.

My favorites that were a bit hard to find at the time were getting in and out of the embedded terminal, and cycleing through terminal tabs and code tabs with the same hotkey.

I use these several times per minute all day. I'm constantly going to the terminal and back to the code.

These were all custom maps. Let me know what you think.

Collapse
 
bjarnemagnussen profile image
Bjarne Magnussen

Coding in Golang and clicking "go to definition" a lot, for me the best shortcut is simply the "navigate back": stackoverflow.com/questions/354243...

Collapse
 
wolfy64 profile image
David De Wulf

Good tips! Thanks for sharing.
Do you know you can just hit the space bar to open your file instead of use CMD+Down_Arrow.?

Collapse
 
icmimar profile image
Olgun S. • Edited

Hi. I just look for how to create new file and new folder without mouse and without go to terminal. When we do ctrl+shift+N in Windows, we are ready to change the cursor file name in the new folder and press enter to create the folder. I want to create a file or folder in the same way. But there is no such thing in VSC for some reason. Don't you think this is a useful and important thing?

Collapse
 
iambudi profile image
I am Budi

A video demonstrating this would be awesome. Thanks.

Collapse
 
andreabarghigiani profile image
Andrea Barghigiani

+1 for the CMD+SHIFT+O shortcut, I was using the outline in sidebar so find this really useful 🎉

Collapse
 
alansolitar profile image
Alan Solitar

Nice article -- this is also a good thing for people who have RSI flare ups when using a mouse.

Collapse
 
subatomicdude profile image
Muhammad Kasim

“Shortcuts are good” by Muhammad Kasim medium.com/@muhammadkasim/shortcut...

Collapse
 
waylonwalker profile image
Waylon Walker

Thanks for the tips getting in the activity bar and out, as well as getting to the file explorer. I did not know of those and usually use a clunky control pallets command to get there.

Collapse
 
rlopez2494 profile image
Robert Lopez

Great piece of advise

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt

Looking for ratpoison. Someone please write this VSCode ext.

Collapse
 
ahamed_ profile image
Sajeeb Ahamed

Nice article. In my case, I think the CMD+SHIFT+E and CMD+SHIFT+O shortcuts are so handy.