Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2015: Ctrl+Shift+8 (View.PopBrowseContext) to navigate back not working?

A keyboard shortcut that I've used frequently going back several Visual Studio versions is Ctrl+Shift+8 to go back to where I was, after doing a F12 to Go To Definition.

In Visual Studio 2015, pressing Ctrl+Shift+8 doesn't seem to do anything.

Opening up Visual Studio 2013 and looking at the Tools | Customize | Keyboard dialog, Ctrl+Shift+8 is mapped to the command View.PopBrowseContext. In Visual Studio 2015, Ctrl+Shift+8 has that same command mapping, but the command doesn't seem to work.

Is there a way to get the View.PopBrowseContext command to navigate back after doing a Go To Definition (F12) in Visual Studio 2015?

like image 697
Jon Schneider Avatar asked Aug 19 '15 14:08

Jon Schneider


People also ask

How do I go back to the previous line in Visual Studio?

By default, Alt+Left navigates back, and if you remove the Alt+Right shortcut for Edit. CompleteWord in Microsoft Visual Studio, Alt+Right navigates forward.

How do I enable shortcut keys in Visual Studio?

On the menu bar, choose Tools > Options. Expand Environment, and then choose Keyboard. Optional: Filter the list of commands by entering all or part of the name of the command, without spaces, in the Show commands containing box. In the list, choose the command to which you want to assign a keyboard shortcut.

Why Ctrl D is not working in VS code?

The main step are: File > Preferences > Keyboard Shortcuts. type "copy line",then you will see the related shortcuts. remember the new shortcut(e.g. Shift + Alt + Down) or modify the shortcut to ctrl + D.

How do I navigate in Visual Studio?

You can use the navigation bar (the drop-down boxes at the top of the code window) to navigate to code in a codebase. You can choose a type or member to go directly to it. The navigation bar appears when you edit code in a Visual Basic, C#, or C++ code base.


2 Answers

Visual Studio 2015 Connect -> View.PopBrowseContext command and others doesn't work (issue removed from Connect site by Microsoft)

Issue on GitHub -> Bring back Go to Definition Navigation Stack #14496

View.NavigateBackward (Ctrl+-) is not good replacement for View.PopBrowseContext (Ctrl+Shift+8). If you invoke Edit.GoToDefinition (F12) and then click a few times with the mouse moving the cursor around, all those moves are recorder in the navigation stack.

View.PopBrowseContext (Ctrl+Shift+8) redirects directly to the previous definition (the place that you invoked Edit.GoToDefinition (F12) last).

  • View.PopBrowseContext
  • Edit.GoToReference
  • View.BrowseNext
  • View.BrowsePrevious
  • Edit.GoToDeclaration
  • View.ForwardBrowseContext

Note: these commands were broken in Visual Studio 2015. Still do not work in Visual Studio 2017.

like image 129
tibx Avatar answered Oct 24 '22 02:10

tibx


When you first start Visual Studio, it offers you a choice of typical usage (not sure how it's called exactly): C++, C#, etc. I believe the initial keyboard binding depends on that choice.

I used FeinCtrl and noticed that View.PopBrowseContext is mapped to Ctrl+Num *, and it works just fine. The Ctrl+Shift+8 is mapped to Edit.ViewWhiteSpace for me...

Do you by chance have a conflict, when another command in a different scope is papped to the same shortcut keys?

like image 41
Vlad Feinstein Avatar answered Oct 24 '22 02:10

Vlad Feinstein