What is the keyboard shortcut to navigate back to the last cursor position in Visual Studio Code?

 

In Visual Studio Code, you can navigate back to the last cursor position using the "Go Back" command. The default keyboard shortcut for this command is Ctrl + - on Windows and Cmd + - on macOS. Here's an example of how to use it:

  1. Open a file in Visual Studio Code.

  2. Place your cursor at a specific location within the file.

  3. Press Ctrl + - (Windows) or Cmd + - (macOS).

This will take you back to the previous cursor position, allowing you to quickly navigate between different parts of your code. You can use this shortcut repeatedly to navigate through multiple cursor positions in reverse chronological order.

Comments