Tab 在 Eclipse 中选择自动完成项?
我在 Eclipse 3.6.2 的 Preferences->General->Keys 中找不到术语 autocomplete 或 intellisense 。
我不想在编写代码时按 Enter 键来选择自动完成项。我可以将 Eclipse 配置为使用 选项卡按钮 接受自动完成项吗?
I can't find either the term autocomplete or intellisense in Preferences->General->Keys in Eclipse 3.6.2.
I don't want to press enter to select an autocomplete item when I write code. Can I configure Eclipse to accept an autocomplete item with the tab button?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我相信您正在寻找“单词完成”Left Alt + /,尽管您可以在“首选项->常规->键”中将其更改为任何组合键。多次按 / 会循环显示不同的建议。它不是很聪明。例如,如果您有
String apple;
和double apps;
并且您输入double x = a
然后 Alt + / eclipse 可能会建议 apple应用程序的数量,尽管 apple 是一个 String。编辑:在某些计算机上看起来像是 ctrl + / 。
I believe you are looking for "word completion" Left Alt + / though you can change it in "Preferences->General->Keys" to be whatever key combo. Pressing / multiple times cycles through the different suggestions. It's not very intelligent. For example if you have
String apple;
anddouble apps;
and you typedouble x = a
and then Alt + / eclipse might suggest apple instead of apps, even though apple is an String.Edit: Looks like it's ctrl + / on some computers.
刚拿到,进入“窗口”>“首选项”>“常规”->“按键”,然后按照前面所说的查找“单词完成”。然后靠近底部的是“绑定”,在它的右侧是一个带有箭头的框,单击此处您可以选择“Tab”以使用制表符进行自动完成。
Just got it, go to Window>Preferences>General->Keys and look for "Word completion" as said before. Then near the bottom is "Binding" and to the right of it, a box with an arrow, clicking there you can select "Tab" to use Tabulator for autocomplete.
自动完成选择键是特定于编辑器的。例如,在 Aptana Studio 中,您可以定义一组用于提案选择的键。请参阅首选项/Aptana Studio/编辑器/JavaScript。 PyDev 与 Aptana Studio 共享一些代码,因此具有类似的功能。请参阅“首选项/PyDev/编辑器/代码完成/在 * 上应用完成”复选框。
说到 Tab 键作为选择器,似乎不需要额外的编码就不可能,因为它具有关注提案窗口的特殊含义。对于那些感兴趣的人可以在 org.eclipse.jface.text.contentassist.CompletionProposalPopup.verifyKey(VerifyEvent) 找到 Tab 处理,
干杯,
最大限度
The autocompletion selection key(s) is editor specific. For instance in Aptana Studio, you could define set of keys for proposal selection. See e.g. Preferences/Aptana Studio/Editors/JavaScript. PyDev shares some code with Aptana Studio, so it has similar capabilities. See "Preferences/PyDev/Editor/Code Completion/Apply completion on *" checkboxes.
Speaking of the Tab key as a selector, it doesn't seem possible w/o extra coding since it has special meaning to focus into proposals window. For these who interested could find Tab handling at org.eclipse.jface.text.contentassist.CompletionProposalPopup.verifyKey(VerifyEvent)
Cheers,
Max
我相信这里也提出了同样的问题 更改自动完成选择的热键
I believe the same question is asked here Change hotkey for autocomplete selection
你可以使用这个技巧,如上所述 -> https://stackoverflow.com/a/6508181/474002
跳转到所需项目后,按
选项卡
->空间
完成了。希望这会有所帮助:)
You can use this trick as mentioned -> https://stackoverflow.com/a/6508181/474002
After you jump to the item you want, press
Tab
->Space
It's done. Hope this will help :)