在 Visual Studio 中导航到类顶部的最快方法是什么

发布于 2024-07-26 23:42:27 字数 78 浏览 2 评论 0原文

如果我正在类的主体内部进行深入编辑,那么导航到类声明顶部(包含“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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

吃不饱 2024-08-02 23:42:28

Ctrl+F2 进入导航栏,然后按 enter 选择当前聚焦的类。

Press Ctrl+F2, to get to the navigation bar, then hit enter to select the currently focused class.

梦里泪两行 2024-08-02 23:42:28

如果出于某种变态的原因你宁愿使用鼠标,你可以选择右上角的函数列表,然后选择“声明”; 这应该将您带到类定义的顶部。 至少在 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...

久而酒知 2024-08-02 23:42:28

在所有方法/类声明上创建书签。 然后使用 (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.

梅倚清风 2024-08-02 23:42:28

Control + G(转到行号),然后键入 1

Control + G which is goto line number, and then type 1

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文