在 Eclipse 和 Visual Studio 中自动关闭括号、大括号等

发布于 2024-08-09 08:06:01 字数 610 浏览 3 评论 0原文

我想知道具体的编辑模式的名称,在该模式下,编辑器会在您输入 ( 后自动关闭括号,然后您可以在按 ) 后立即跳转一个选项卡。它与 " 做同样的事情。如何让这个东西在 VisualStudio 和 Eclipse 中工作?

谢谢。

upd:标题的澄清。该功能的名称是AutoClose

upd2:Visual Studio 本身不支持此功能 --> 来源

upd3:类似的问题。事实证明,ReSharper 可以为 C# 和 VB 执行此操作,但对于本机 C++ 仍然无能为力。

I want to know the name of the specific editing mode in which the editor automatically closes the paren after you write (, and then you can jump right after the ) when you press a tab. It does the same thing with ". How can one get this thing working in VisualStudio and in Eclipse?

Thanks.

upd: clarification of the title. The name of the feature is AutoClose

upd2: Visual Studio doesn't support this natively --> source

upd3: A similar question. Turns out ReSharper can do this for C# and VB, but still nothing for native C++.

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

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

发布评论

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

评论(2

紫﹏色ふ单纯 2024-08-16 08:06:01

我打算使用 eclipse IDE(因为这是我所知道的,但是这里有很多 VisualStudio 专家,可能会附带另一半)。

在 Eclipse 中,您正在谈论“Formatter”功能,该功能位于菜单 Window / Preferences 下,然后在右侧选项卡中选择(Java / Code Style / Formatter ),然后您可以编辑活动配置文件(有一个部分称为“大括号”,定义您正在谈论的行为)。

要将该行为分配给其他文件类型,您可以选择使用 Java 编辑器打开该文件,或者默认将该编辑器 (Java 编辑器) 分配给另一个扩展名(在“常规”/“编辑器”/“文件关联”下,也在首选项对话框中)。

希望这对您有意义。

I am going for the eclipse IDE (cause is the one that i know, but there are lots of VisualStudio gurus over here that probably will come with the other half).

In eclipse you are talking about the "Formatter" feature, that is located under the menu Window / Preferences, and then select in the right tab (Java / Code Style / Formatter ) and then you can edit the active profile (there is a section called "braces" that defines the behaviour that you are talking about).

To assign that behavior to another file type, you can choose open that file with the Java Editor, or assign that editor (Java Editor) by default to another extension (Under General / Editors / File Associations, also in the preferences dialog).

Hope this makes sense for you.

染火枫林 2024-08-16 08:06:01

智能感知?如果我理解正确的话

Intellisense? If I understand you correctly

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