Tab 在 Eclipse 中选择自动完成项?

发布于 2024-11-01 00:16:19 字数 208 浏览 6 评论 0原文

我在 Eclipse 3.6.2 的 Preferences->General->Keys 中找不到术语 autocompleteintellisense

我不想在编写代码时按 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

遥远的她 2024-11-08 00:16:19

我相信您正在寻找“单词完成”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; and double apps; and you type double 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.

各空 2024-11-08 00:16:19

刚拿到,进入“窗口”>“首选项”>“常规”->“按键”,然后按照前面所说的查找“单词完成”。然后靠近底部的是“绑定”,在它的右侧是一个带有箭头的框,单击此处您可以选择“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.

野侃 2024-11-08 00:16:19

自动完成选择键是特定于编辑器的。例如,在 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

一场信仰旅途 2024-11-08 00:16:19

我相信这里也提出了同样的问题 更改自动完成选择的热键

Eclipse 中的所有键绑定均在 Window -> 中定义。首选项->
一般->钥匙。我认为您无法更改用于选择的内容
自动完成列表中的内容,但您可以使用空格来选择和
然后输入新行。

I believe the same question is asked here Change hotkey for autocomplete selection

All key bindings in Eclipse are defined in Window -> Preferences ->
General -> Keys. I don't think you can change what is used to select
stuff from the autocomplete list, but you can use space to select and
then Enter for new line.

铃予 2024-11-08 00:16:19

你可以使用这个技巧,如上所述 -> 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 :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文