If I accidentally press any key and the cursor goes somewhere else, how do I return to previous location? What is shortcut key for that?
Any extension that may help.
You can go back to your previous location with the Go > Back command or Ctrl+Alt+-.
You can press Ctrl + Shift + P , then Enter it also repeat the lastest command.
If you are playing around multiple files in Visual Studio Code, and wondering how to navigate back to the previous files, there is a simple way. Visual Studio Code allows us to check the history of navigated files in Navigation History lists. You can open this window from “Goto–> Navigation History” or by just simply pressing Ctrl + Tab.
Visual Studio Code extension that provides the "Goto last edit location" command. After installing and pressing F1, you should see the 'Goto last edit location' command in the drop down: Press CTRL+Q to invoke the command. v0.2.1 Exclude edit events from non-file documents.
Visual Studio Code Tips and Tricks ... You can go back to your previous location with the Go > Back command or ⌃-(Windows Alt+Left, Linux Ctrl+Alt+-). You can also see the type definition if you press Ctrl (Cmd on macOS) when you are hovering over the type. Go to References.
The navigation bar appears when you edit code in a Visual Basic, C#, or C++ code base. In a partial class, members defined outside the current code file may be disabled (they appear in gray). You can navigate around the drop-down boxes as follows: To navigate to another project that the current file belongs to, choose it in the left drop-down.
Mac: Ctrl + -
Windows: Alt + Left
Linux: Ctrl + Alt + -
Key Bindings for Visual Studio Code
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With