如何使用 ReSharper 导航到右括号?

发布于 2024-12-21 12:57:35 字数 73 浏览 3 评论 0原文

假设 if 语句中有大量 C# 代码。如果您将克拉放在左括号旁边,ReSharper 中是否有热键或其他功能可以自动将您带到右括号?

Say you have a large amount of C# code in an if statement. If you place your carat next to the opening bracket, is there a hotkey or something in ReSharper that will automatically take you to the closing bracket?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(4

意中人 2024-12-28 12:57:36

无论您是否安装了 R#,VS 都会提供此快捷方式。

Ctrl + ] 将带您到左大括号。随后按下将在示波器的 RHS/LHS 之间跳转。

VS offers this shortcut, regardless of whether you have R# installed.

Ctrl + ] will take you to the opening brace. Subsequent presses will jump between the RHS/LHS of the scope.

做个少女永远怀春 2024-12-28 12:57:36

请参阅转到 Visual Studio 中的匹配大括号?(现在作为请求的答案!)

See Go to Matching Brace in Visual Studio? (now as an answer as requested!)

傾城如夢未必闌珊 2024-12-28 12:57:36

ReSharper 将快捷方式(Control + ´ - 我有德语键盘)分配给不同的命令。要恢复它,请转到“工具”-“选项”-“环境”-“键盘”,搜索 Edit.GotoBrace 并输入所需的快捷键。
查看当前分配给哪个命令,然后首先通过搜索该命令并单击删除来删除该命令。然后再次搜索 Edit.GotoBrace 并分配快捷方式。

直接分配而不先删除它是行不通的。

ReSharper assigns the shortcut (Control + ´ - I have german keyboard) to a different command. In order to restore it go to Tools - Options - Environment - Keyboard, search for Edit.GotoBrace and enter the desired shortcut key.
See to what command it is currently assigned and then remove it for this command first by searching this command and clicking Remove. Then again search for Edit.GotoBrace and assign the shortcut.

Directly assigning without Removing it first didn´t work.

眉黛浅 2024-12-28 12:57:36

Visual Studio 的快捷方式是(在 IntelliJ 快捷方式集下): Control + ] 当光标位于左大括号上时,将转到右大括号。反之亦然。

Visual Studio's shortcut is (under the IntelliJ shortcut set): Control + ] when your cursor is on the opening brace goes to the ending brace. The inverse is also true.

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