When we right click and select Go to definition
in VSCode, it opens the new file in place of the current. How do we navigate back to where we came from?
Asked
Active
Viewed 1,505 times
2

Ole
- 41,793
- 59
- 191
- 359
-
it is possibly a duplicate: https://stackoverflow.com/questions/35424367/how-to-navigate-back-to-the-last-cursor-position-in-visual-studio-code – mpakbaz Nov 18 '18 at 22:29
2 Answers
1
On Windows, it's Alt+LeftArrow
, just like navigating backwards in a web browser.

asherber
- 2,508
- 1
- 15
- 12
-
1
-
Ah, I didn't realize what OS you were on. Take a look here: https://stackoverflow.com/a/35433087/226781 – asherber Nov 19 '18 at 13:15
-
Also, in VS Code, take a look at File -> Preferences -> Keyboard Shortcuts. You can search there by command name (and also by key name, like LeftArrow, which is handy). – asherber Nov 19 '18 at 13:18