Grant Smith
Grant Smith

Reputation: 765

Visual Studio jump-to shortcut

What it the Visual Studio shortcut to switch to recently edited line of code ? (useful after accidentally pressing Page Down for example). I saw my mother using it but couldn't spot what the combination was. Also couldn't find on internet.

Upvotes: 10

Views: 2398

Answers (5)

angularsen
angularsen

Reputation: 8668

The popular ReSharper add-in adds a hotkey CTRL+SHIFT+Backspace that brings you back through your history of edit points.

Upvotes: 1

Conrad Frix
Conrad Frix

Reputation: 52645

Ctrl + - will navigate backward. Ctrl + Shift + - will go forward

Note: This won't work if you use the minus from the keypad

Upvotes: 6

Oded
Oded

Reputation: 498942

Ctrl + - (that's a hyphen) will take to back to the last place you navigated from.

You can download PDFs of common keyboard shortcuts for visual studio 2010 here.

Upvotes: 13

Hans Passant
Hans Passant

Reputation: 941317

Ctrl+Z. Tools + Options, Text Editor, General. Tick "Include insertion point movements in Undo list".

Upvotes: 4

zsalzbank
zsalzbank

Reputation: 9857

Ctrl-Z will bring you back to where you last edited if you did it by accident. It will undo the change.

You can also use the bookmark feature of visual studio to bookmark certain lines and then use Ctrl-K, Ctrl-N to go to the next one or Ctrl-K, Ctrl-P to go to the previous one.

Ctrl-= selects from the current location in the editor back to the previous location in the navigation history.

Upvotes: 1

Related Questions