How to go back and forth in visual studio 2010

Visual StudioVisual Studio-2010

Visual Studio Problem Overview


In xcode and in eclipse there is a version where we can go back and forth to our last cursor location.

For example, say I am editing one function. Then I go to the definition of that function. Then I want to go back to the first function.

Say I am editing A() that call B(). In A(), I go to the definition of B() and I want to go back to editing A() again.

How do I do so?

Visual Studio Solutions


Solution 1 - Visual Studio

Use Control-minus (Ctrl- "-"). See here

If it doesn't work, it's probably because you use a different key binding. Go to Tools->Options->Environment->Keyboad->"View.NavigateBackwards" and add your key (Don't forget to Apply !)

Solution 2 - Visual Studio

Use the "Ctrl"-"Shift"-"-" to move forward after you have used "Ctrl"-"-" to move back.

see Microsoft blog

Solution 3 - Visual Studio

I use the Visual Assist X plugin for Visual Studio, which (among other things) allows me to use the Back and Forward buttons on the mouse.

For a keyboard shortcut, I use Alt-Left Arrow for back, and Alt-Right Arrow for forward. I don't know if that's through Visual Studio or Visual Assist X.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser4951View Question on Stackoverflow
Solution 1 - Visual StudioOtávio DécioView Answer on Stackoverflow
Solution 2 - Visual StudioTarun AroraView Answer on Stackoverflow
Solution 3 - Visual StudioTimView Answer on Stackoverflow