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?
How do I move a line in Visual Studio 2019? ALT + UP/DOWN will move a line up or down.
Go to last edit location: (Ctrl + Shift + Backspace) [different from navigate backward, which just goes to last cursor location -- this goes to last place where code was edited] Multi-caret editing: (Ctrl + Alt + Click) [allows you to go to multiple locations and add text, for example]
On the menu bar, choose Tools > Options. Expand Environment, and then choose Keyboard.
You can hit Ctrl - (Ctrl and the minus sign) I believe. Also, Ctrl Shift minus 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With