在 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/