Eclipse 中的 Ctrl-Space 而不按 Ctrl-Space
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1959946/
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
Ctrl-Space in Eclipse without Pressing Ctrl-Space
提问by Brandon O'Rourke
I've just started using Eclipse and I noticed that when I start typing a local variable name it doesn't come up with suggestions like Visual Studio does until I press Ctrl+Space. Is there any way to get it to do this automatically? I find Ctrl+Spacean awkward key press.
我刚刚开始使用 Eclipse,我注意到当我开始输入局部变量名称时,它不会像 Visual Studio 那样提出建议,直到我按下Ctrl+ Space。有没有办法让它自动执行此操作?我发现Ctrl+Space一个尴尬的按键。
回答by Mark Pope
These bugs (and a solution if you use Eclipse >3.4) may be of interest to you:
您可能会对这些错误(如果您使用 Eclipse > 3.4 时提供解决方案)感兴趣:
A. Allow more character triggers as @Samuel said (fixed in 3.4 onwards):
A. 如@Samuel 所说,允许更多字符触发器(在 3.4 中修复):
https://bugs.eclipse.org/bugs/show_bug.cgi?id=159157
https://bugs.eclipse.org/bugs/show_bug.cgi?id=159157
Change the default in Auto activation triggers for Javato ._abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
将Java 的自动激活触发器中的默认值更改为._abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
B. Allow content assist everywhere automatically (not fixed):
B. 自动在任何地方允许内容辅助(不固定):
回答by Asti
What works:
什么工作:
Change the Auto activation triggers to .abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_
将自动激活触发器更改为 .abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_
You're unlikely to type anything else to get assist started.
您不太可能输入任何其他内容来获得帮助。
回答by Yuval Adam
- Window -> Preferences
- Java -> Editor -> Content Assist
- Change auto-activation to suit your preferences
- 窗口 -> 首选项
- Java -> 编辑器 -> 内容辅助
- 更改自动激活以适合您的偏好
You will probably want to set the delay to 0.
您可能希望将延迟设置为 0。
回答by Rajaraman
Also to make Auto Complete work in XML files do the following changes in Preferences -> XML -> XML Files -> Editor -> Content Assist
还要使自动完成在 XML 文件中工作,请在首选项 -> XML -> XML 文件 -> 编辑器 -> 内容辅助中进行以下更改
Under Auto Activation section, provide the following values
在自动激活部分下,提供以下值
- Make Auto activation delay (ms): 0
- Prompt when these characters are inserted: <=:._abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
- 使自动激活延迟(毫秒):0
- 插入这些字符时提示:<=:._abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
Following screenshot explains the same
以下屏幕截图解释了相同的内容