如何在 Visual Studio 2008 中从 For 或 For Each(类似于大括号,但在 vb 中)跳转到下一个语句

发布于 2024-08-21 15:49:35 字数 804 浏览 4 评论 0原文

有谁知道从关键字开头跳转的键盘快捷键是什么,例如 forforEachifwhile< /code> 等...当您使用“vb.net”时是否在 Visual Studio 中?我发现了以下问题,其中我以为会做我正在寻找的事情,但事实并非如此。

根据上面链接问题的评论,我检查了路径:

  • Tools/Options/Environment/Keyboard

...Edit.GotoBrace< /code>命令。根据我的阅读,该命令应该映射到瑞典语的键绑定:CTRL + å

Vb.net 本身不使用大括号,但在下面的示例中:

  For Each Foo in Bar
    Do lots of stuff
  Next

我本以为相同的命令应该将我从 For Each 跳转到“Next “但它没有任何作用。是否还有另一个命令(或者该命令应该有效,但本地有问题?)

Does anyone know what the keyboard shortcut for jumping from the start of a keyword, such as for, forEach, if, while etc... is in Visual Studio when your using "vb.net"? I found the following Question, which I thought would do what I was looking for, but it doesn't.

Following a comment from the linked question above, I checked the path:

  • Tools/Options/Environment/Keyboard

...for the Edit.GotoBrace command. From what I read, the command should be mapped to the keybinding: CTRL + å in Swedish.

Vb.net doesn't use braces per se, but in the following example:

  For Each Foo in Bar
    Do lots of stuff
  Next

I would have thought that the same command should jump me from the For Each to the "Next" but it doesn't do anything. Is there another command (or should that command work but something is broken locally?)

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

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

发布评论

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

评论(2

念三年u 2024-08-28 15:49:35

为了其他 SO 用户的缘故,所以答案不会作为答案中的评论隐藏:

“...有键盘快捷键(Ctrl+Shift+Up 和 Ctrl+Shift+Down)可以移动编辑器插入符
在突出显示的参考文献/关键字之间。”

来自:

https://connect.microsoft.com/VisualStudio/feedback/details/534430/block-navigation-for-vb-net-similar-to-paranthesis-navigation

For the sake of other SO users, and so the answer isn't buried as a comment inside of an answer:

"...there are keyboard shortcuts (Ctrl+Shift+Up and Ctrl+Shift+Down) that move the editor caret
between highlighted references/keywords."

from:

https://connect.microsoft.com/VisualStudio/feedback/details/534430/block-navigation-for-vb-net-similar-to-paranthesis-navigation

躲猫猫 2024-08-28 15:49:35

没有可以做的。这是比匹配牙套困难得多的任务。找到匹配的NEXT关键字需要进行语法分析。只需对文本进行标记即可匹配大括号。我建议您在 connect.microsoft.com 上提出功能请求,这是一个很好的请求。

No can do. It is a much harder task than matching braces. Finding the matching NEXT keyword requires syntax parsing. Braces can be matched by merely tokenizing the text. I'd recommend you put in a feature request at connect.microsoft.com, it is a good request.

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