如何在 Eclipse 中禁用大括号({})的自动创建?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7374119/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to disable auto creation of curly brackets({}) in eclipse?
提问by Avery3R
When I write
当我写
if(true)
{
eclipse auto-completes it to
eclipse 自动完成它
if(true)
{
//cursor here
}
Which gets annoying when I want to write an else or else if. Any way to disable it?
当我想写一个 else 或 else if 时,这会很烦人。有什么办法可以禁用吗?
回答by Bart Kiers
From Eclipse's main window, choose Windowand then Preferences. Then choose Java, Editorand then Typingto get the following screen:
在 Eclipse 的主窗口中,选择Window,然后选择Preferences。然后选择Java,Editor然后Typing得到以下屏幕:
and un-check {Braces}.
并取消选中{Braces}。
Tested on Eclipse Helios.
在 Eclipse Helios 上测试。