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?
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.
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.
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.
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
By using the Navigate Backwards command. You can find a more detailed description here.
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?)
© 2022 - 2024 — McMap. All rights reserved.