visual-studio “Go to Definition”后,有没有返回到你来处的命令?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/877873/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 10:30:01  来源:igfitidea点击:

After "Go to Definition", is there a command to return to where you came from?

visual-studio-2010visual-studiovisual-studio-2008

提问by Number8

If so, is it a stack?
That is, can I:
GoToDefinition
GoTODefinition
GoToDefinition

如果是这样,它是一个堆栈吗?
也就是说,我可以:
GoToDefinition
GoTODefinition
GoToDefinition

and then pop back up the call stack?
None of the Edit.GoTo... commands do what I am looking for.
TIA.

然后弹出调用堆栈?
Edit.GoTo... 命令都没有做我正在寻找的。
TIA。

回答by Brian Sullivan

You can go to the last place you navigated to by doing CTRL+-

您可以通过执行CTRL+转到您导航到的最后一个地方-

(That's the control key and the "minus" or "dash" key.)

(这是控制键和“减号”或“破折号”键。)

回答by Borislav Ivanov

The correct way to navigate this stack is with View.ForwardBrowseContextand View.PopBrowseContextcommands. In the default C# schema they are bound to Ctrl+Shift+7and Ctrl+Shift+8respectively.

导航此堆栈的正确方法是使用View.ForwardBrowseContextView.PopBrowseContext命令。在默认的 C# 模式中,它们分别绑定到Ctrl+ Shift+7Ctrl+ Shift+ 8

回答by Vadim

Tip by Brian Sullivan (Ctrl+-) works great.

Brian Sullivan 的提示 (Ctrl+-) 效果很好。

You also can use a side button on your mouse (if your mouse has a side button and that button programmed for Back functionality in a browser).

您还可以使用鼠标上的侧键(如果您的鼠标有一个侧键并且该按钮在浏览器中为返回功能而编程)。

回答by Harold Bamford

If you have an MS mouse with the latest Intellipoint drivers installed, you can have program-specific commands associated with mouse buttons. Find out what the "Back" keyboard command is for your program. For VS .NET 2003/2005/2008 it is Ctrl+\ (control backslash) which is tied to View.NavigateBackward. Then go into the Control Panel for the mouse, click on the checkbox for "Enable program-specific settings" and then click on Settings.

如果您的 MS 鼠标安装了最新的 Intellipoint 驱动程序,则您可以拥有与鼠标按钮相关联的特定于程序的命令。找出您的程序的“后退”键盘命令。对于 VS .NET 2003/2005/2008,它是 Ctrl+\(控制反斜杠),它与 View.NavigateBackward 相关联。然后进入鼠标的控制面板,单击“启用程序特定设置”复选框,然后单击设置。

Click on "Add" and pick your favorite Visual Studio and map Ctrl-\ to the left button.

单击“添加”并选择您最喜欢的 Visual Studio 并将 Ctrl-\ 映射到左侧按钮。

Others programs of interest:

其他感兴趣的程序:

uVision3 IDE (the Keil compiler):    Alt-Left
Adobe Reader 9.0:                    Alt-Left
javaw (as in Eclipse):               Ctrl-F2
VB6:                                 Ctrl-Shift-F2

Actually, the Eclipse one isn't Ctrl-F2 but is something that cannot be mapped, so I added that mapping within Eclipse and then the new mapping in the mouse driver.

实际上,Eclipse 不是 Ctrl-F2 而是无法映射的东西,所以我在 Eclipse 中添加了该映射,然后在鼠标驱动程序中添加了新映射。

Hope that helps!

希望有帮助!

回答by Steve Howell

In Microsoft Dev Studio it was always mapped to CTRL+*(The *on the numerical keypad) but not in C# Express, I notice. Here it's Ctrl+Shift+8, as already noted.

我注意到,在 Microsoft Dev Studio 中,它始终映射到CTRL+ **数字键盘上的The ),但在 C# Express 中则不然。这里是Ctrl+ Shift+ 8,如前所述。

回答by zeeshan

Navigate backwardand Navigate forwardis the right choice. These can be found in toolbars.

Navigate backward并且Navigate forward是正确的选择。这些可以在工具栏中找到。

回答by Neil N

I just use the back button on my mouse.

我只是使用鼠标上的后退按钮。

Has always worked by default for me.

一直默认对我来说有效。

回答by Daniel Elliott

A third party tool like ReSharper would give you the functionality you require.

像 ReSharper 这样的第三方工具将为您提供所需的功能。

It is "da bomb!"

是"da炸弹!"

Navigation in the Solution explorer is a thing of the past.

解决方案资源管理器中的导航已成为过去。

Kindness,

善良,

Dan