Eclipse:即时自动完成
我对 Eclipse 自动完成代码的方式不太满意。我喜欢 IntelliJ 提示建议的方式(有人说它相当激进,但我喜欢这样)。
所以我去了:窗口->首选项-> Java->编辑->内容辅助并将延迟设置为 0 毫秒,并将自动激活触发器设置为 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz。
现在,Eclipse 的自动补全功能看起来非常快,但有一件非常烦人的事情: 它在每次点击空格时完成建议的变量名称。
因此,当我想输入:
String joe = "Joe";
eclipse 的速度足以毁掉它:
String joeString = ...;
换句话说,按: String joe[space]
makesjoeString.
我希望我很清楚 enoguh ,谢谢你的建议:)
I am not entirely comfortable with way how Eclipse autocompletes code. I like the way how IntelliJ prompts suggestions (some say it's rather aggresive, but I like it that way).
So I went to: Window -> Preferences -> Java -> Editor -> Content Assist and set delay to 0ms and autoactivation trigger to ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.
Now Eclipse looks really fast with autocompletion but there's one very annoying thing:
It completes proposed names of variables on every space hit.
So when I want to type:
String joe = "Joe";
eclipse is fast enough to ruin it to:
String joeString = ...;
In other words , pressing: String joe[space]
makesjoeString.
I hope I was clear enoguh, thanks for suggestions :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以取消选中“窗口->”首选项-> Java->编辑->内容辅助 ->自动插入单个提案'。完成后,您应该只会看到一个包含提案的弹出窗口,但它不会自动插入到编辑器中。
You can uncheck 'Window -> Preferences -> Java -> Editor -> Content Assist -> Insert single proposals automatically'. Once done, you should only get a popup window with the proposal but it will not be inserted automatically in the editor.
增加延迟,以便您仍然可以不间断地输入简短的内容。我不确定是否有另一种方法可以解决它,因为您要求 Eclipse 始终立即自动完成,而 space 选择它当前的自动完成猜测。
Increase the delay so that you can still type short things without stopping. I'm not sure there is another way to solve it as you are asking Eclipse to always instantaneously autocomplete, and space chooses it's current autocomplete guess.
问题跟踪器对此有一个解决方案。
将 jar 复制到 eclipse/dropins 文件夹中。下次重新启动时,空格将被禁用作为自动完成触发器。
There is a solution on the issue tracker for this.
Copy the jar in the eclipse/dropins folder. With the next restart space is diabled as autocompletion trigger.