Is there a "back" button/hotkey for navigation in Visual Studio 2008?
Asked Answered
F

6

18

I jumped to a line in a code file in Visual Studio using "Go to definition". I am now lost in the file and I want to go back to the line I was at before. How do I do it?

Filipino answered 8/7, 2009 at 19:58 Comment(0)
U
27

You can hit Ctrl+- I believe. Also, Ctrl+Shift+- navigates forward.

Depending on your mouse software, you should be able to map those keyboard shortcuts to your mouse's back/forward buttons. You can typically do this with gaming mice, and there's probably third-party gaming software that lets you do it also. Mapping "Find all references" to a button is great too.

Uncinate answered 8/7, 2009 at 20:0 Comment(5)
Any plugin/app that changes mouse behavior per application? I'd love to map the "navigate back" button on my mouse to this keyboard shortcut in VS. It works natively in VS 2010 but no love for VS 2008.Ongoing
If you have a Microsoft mouse, IntelliPoint should do the trick. If you have a Logitech mouse, you can try SetPoint.Uncinate
I know I can change the mappings of the buttons, but if I change them in SetPoint, they will be global, and I would lose the native behavior of the buttons for navigation in many other applications.Ongoing
SetPoint sometimes let you set application-specific button assignments. It depends on the mouse you have I think (which is silly, since they -could- enable it for all mice, if they really wanted to)Uncinate
You're a genius. I found buried in the SetPoint software application-specific button assignments. Seems to work so far!Ongoing
M
2

You can also use you mouse back and forward navigation buttons if you have such a device.

Please note that if you are using a Logitech device you need to launch SetPoint with the same privileges as Visual Studio. In other words, if you launch Visual Studio as admin, you need to launch SetPoint as admin too for the Back and Forward to work properly.

Mientao answered 19/3, 2014 at 13:53 Comment(0)
H
2

I realize this is an old thread, but since it was the first link I came across from a Google search, I'll mention what I found:

In Visual C# 2010 Express, under Tools -> Settings, there is a "Basic Settings" option and an "Expert Settings" option. (Basic Settings is selected by default.) If you select Expert Settings, the standard toolbar will have back/forward buttons.

Hills answered 9/1, 2015 at 22:46 Comment(0)
B
2

In Visual Studio 2019

To change this setting to whatever you want (or see the current mapping), use

Tools->options

search for Keyboard under Show commands containing:

then search for NavigateBackward or NavigateForward

Bivalve answered 1/7, 2020 at 8:5 Comment(1)
Once selected, each of these should also show the shortcut key to activate (eg. "ctrl+ -", and "ctrl+shift+ -"). In the list mine showed up as View.NavigateBackward & View.NavigateForward, which also gave me a hint on where to find them in the "File Menus", which then assisted in adding two custom shortcut icons on the toolbar. Although - they might already be part of the "Standard" toolbar.Scoter
P
1

By using the Navigate Backwards command. You can find a more detailed description here.

Pannikin answered 8/7, 2009 at 20:1 Comment(0)
P
1

What threw me for a loop is that only the minus on the left side of my keyboard works, not the one on the numpad. This should save me a lot of time. I always wished for this and never thought to search for help on it.

(This is in Visual c# 2010 Express with an older Microsoft ergo keyboard (2000?)

Piggy answered 8/12, 2011 at 4:9 Comment(1)
Thank you for highlighting this. I had given up and was searching for other solutions when I saw your comment tried it out and it worked. I'm using VS2019.Scoter

© 2022 - 2024 — McMap. All rights reserved.