visual-studio - Visual Studio 2012 的导航按钮如何运作?

标签 visual-studio

在 Visual Studio 2012 的 IDE 中,我注意到现在有向前和向后导航按钮,类似于网络浏览器。

在解决方案资源管理器中,这些按钮似乎允许您在搜索之间来回导航。参见 this文章了解更多详情。

但是,这些导航按钮也存在于 IDE 主菜单正下方的工具栏中。使用这些按钮似乎可以控制激活哪些文档窗口,但我找不到解释它们确切行为的博客文章。

是否有博客文章或在线规范准确描述了这些导航按钮的作用?

最佳答案

标准工具栏中的向前/向后导航按钮可让您导航至导航堆栈中的先前位置,无论它们是否如您所述位于不同的文档中。

例如,您可能正在查看某个调用另一个方法“bar”的方法“foo”,然后按 F12 以查看“bar”中发生了什么。当您这样做时,您的光标在“foo”中的位置被推到导航堆栈上,当您按下 Navigate Backward 按钮时,您将回到“foo”中,正是您离开的位置。

添加导航堆栈的情况的其他示例是(来自下面链接的博客文章):

  • Incremental search (including reverse) leaves a go-back marker at beginning of search and another one at the end.
  • A GoToLine or a Mouse-click that moves the cursor 10+ lines from current position (so 11 lines and more) drops a go-back marker at new location.
  • A destructive action (after having moved the cursor to a new location) drops a go-back marker
  • Doing a Find (Ctrl+F) drops a go-back marker at the found location
  • Opening a file drops a go-back marker wherever the cursor was on the old file, and drops another on the opened file.

此外,值得一提的是,这些按钮具有键盘快捷键 (Ctrl + -) 和 (Ctrl + Shift + -)。

有关详细信息,请参阅此 blog post .

关于visual-studio - Visual Studio 2012 的导航按钮如何运作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11926282/

相关文章:

windows - 混合来自不同版本的 Visual Studio 的库时的运行时问题

Python错误: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 4

c++ - 查看内存转储的调用堆栈时,如何在VS中指定源代码目录?

visual-studio - xUnit 测试不会出现在 tfs 上

visual-studio - 将当前的 .vssettings 转换为 VS 2013 的 .vstheme

c# - 是否可以在解决方案资源管理器中看不到窗体图标的情况下使用 C# 部分 WinForm 类文件?

c++ - CMake 和不同版本的 Visual Studio

visual-studio - 无法在 Visual Studio 2017 RC 中添加全局 JavaScript Intellisense 引用

c# - 如何通过脚本模拟 AWS Toolkit for Visual Studio 中的构建和部署功能?

c++ - #include<iostream.h> 在 turboc++ 中运行良好,但在 Visual Studio 中运行不佳。为什么?