在 Visual Studio 中导航到类顶部的最快方法是什么
如果我正在类的主体内部进行深入编辑,那么导航到类声明顶部(包含“class ClassName”的行)的最快(即最少的键盘快捷键)方法是什么?
If I'm editing deep within the body of a class, what would be the quickest (ie. fewest keyboard shortcuts) way to navigate to the top of the class declaration (the line that contains "class ClassName"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
按 Ctrl+F2 进入导航栏,然后按 enter 选择当前聚焦的类。
Press Ctrl+F2, to get to the navigation bar, then hit enter to select the currently focused class.
如果出于某种变态的原因你宁愿使用鼠标,你可以选择右上角的函数列表,然后选择“声明”; 这应该将您带到类定义的顶部。 至少在 VS2005 中这对我有用......
If for some perverted reason you'd rather use the mouse, you can select the list of functions at the top right and then just select "Declarations"; that should take you to the top of the class definition. At least that works for me in VS2005...
在所有方法/类声明上创建书签。 然后使用 (Ctrl + K, Ctrl + N) 作为下一个书签,(Ctrl< /kbd> + K, Ctrl + P) 为上一个书签。 然后你就可以稍微“翻阅”它们。 对我来说效果很好。 或者使用 Ctrl + Home 将您带到文档的最顶部。
Create bookmarks on all your methods / class declarations. Then use (Ctrl + K, Ctrl + N) for the next bookmark, (Ctrl + K, Ctrl + P) for the previous bookmark. Then you can just "thumb" through them somewhat. Works great for me. Or use Ctrl + Home to take you to the very top of the document.
Control + G(转到行号),然后键入 1
Control + G which is goto line number, and then type 1