VS Code: Shortcuts for Jumping to the last Edit Location

Updated: June 11, 2022 By: A Goodman Post a comment

In VS Code (Visual Studio Code), you can quickly and conveniently move your mouse cursor to the last edit location by using the following shortcuts:

  • Mac:
    • Jump back: Ctrl + (the minus key on your keyboard)
    • Jump forward: Ctrl + Shift +
  • Windows:
    • Navigate back: Alt + Left Arrow key
    • Navigate forward: Alt + Right Arrow key


Note: If you’re using Safari, this demo video might not work nicely or not start at all. Please use Chrome, Edge, Firefox, or another web browser instead.

You can see exactly the shortcuts that match your operating system by heading to the top bar of VS Code and opening the Go menu (the first three rows):

Note: At the time of writing, VS Code only remembers the last and the current cursor position

Further reading:

You can also check out our Visual Studio Code topic page for more tips and tricks to improve your producibility and coding experience.

Notify of
Inline Feedbacks
View all comments

Related Articles