我刚开始使用 Eclipse,并注意到当我开始键入本地变量名时,它不会像 Visual Studio 那样提供建议,直到我按下 Ctrl + Space。有没有办法让它自动做到这一点?我发现 Ctrl + Space是一个笨拙的按键。
You will probably want to set the delay to 0.
These bugs (and a solution if you use Eclipse >3.4) may be of interest to you:
A. Allow more character triggers as @Samuel said (fixed in 3.4 onwards):
https://bugs.eclipse.org/bugs/show_bug.cgi?id=159157
Change the default in Auto activation triggers for Java to ._abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
._abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
B. Allow content assist everywhere automatically (not fixed):
https://bugs.eclipse.org/bugs/show_bug.cgi?id=101420
What works:
Change the Auto activation triggers to .abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_
.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_
You're unlikely to type anything else to get assist started.
Also to make Auto Complete work in XML files do the following changes in Preferences -> XML -> XML Files -> Editor -> Content Assist
Under Auto Activation section, provide the following values
Following screenshot explains the same