0

Do you happen to know how to go back ( and further back ) to the previous cursor locations in Visual Code Editor?

So far, what I do is a quick "undo" and "redo" just to see where I was but this is not only stupid but also extremely limited as it can go back to only to the last cursor position and not unable to go further back.

Use Case Scenario:

  • 1) you are on line 1, did something there.
  • 2) you then goto line 100 and did something else there too.
  • 3) you goto line 200 and you just made a change or you just happened to place the cursor there
  • 4) then you happened to visit 300.

Let's keep it there, for now.

Here is the deal:

How do you go back to where you were a few steps back so that the following is possible;

You do your keyboard-combo and you are first taken back to line 200 and then you do the combo again, you are now at 100 and finally you made your way back to #1.

Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567
Average Joe
  • 4,521
  • 9
  • 53
  • 81
  • Possible duplicate of [How to navigate back to the last cursor position in Visual Studio Code?](https://stackoverflow.com/questions/35424367/how-to-navigate-back-to-the-last-cursor-position-in-visual-studio-code) – Aamir Khan Nov 06 '17 at 04:52
  • you are right. that's a dup. the answer to this question is this: `OSX ⌃- / ⌃⇧-` – Average Joe Nov 06 '17 at 08:59

2 Answers2

1

On Windows:

Alt+ = navigate back

Alt+ = navigate forward

On Mac:

^ control+- = navigate back

^ control+⌘ command+- = navigate forward

On Ubuntu Linux:

Ctrl+Alt+- = navigate back

Ctrl+Shift+- = navigate forward

slava
  • 791
  • 1
  • 11
  • 26
Thanmai C
  • 741
  • 1
  • 7
  • 10
0

For the mac, that would be CTRL - for the backward and CTRL SHIFT - for the forward. The - means the minus key.

Average Joe
  • 4,521
  • 9
  • 53
  • 81