在 mac os x 上的 eclipse 中插入代码模板(ctrl-space 不起作用)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2209181/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 14:23:28  来源:igfitidea点击:

Insert code template in eclipse on mac os x (ctrl-space not working)

eclipsemacos

提问by Kay Pale

How can insert code template in eclipse on mac os x?

如何在 mac os x 上的 eclipse 中插入代码模板?

ctrl-space is not working :(

ctrl-space 不起作用:(

回答by VonC

The Ctrl+ spaceor ?+ spacecan be intercepted by Spotlight (depending on its configuration)

所述Ctrl+space?+ space(取决于它的配置)可以通过聚光灯被拦截

Go into:

进入:

System Preferences -> Spotlight

At the bottom, change the Spotlight menu shortcut (Ctrl+Espace) in any other shortcut like:

在底部,在任何其他快捷方式中更改 Spotlight 菜单快捷方式 ( Ctrl+ Espace),例如:

(cmd) ?+ Ctrl+ espace

(cmd) ?+ Ctrl+espace

http://km.support.apple.com/library/APPLE/APPLECARE_ALLGEOS/HT2531/HT2531---fr.png

http://km.support.apple.com/library/APPLE/APPLECARE_ALLGEOS/HT2531/HT2531---fr.png

回答by Matt

I know this is an old post, but I didn't find much else when searching for this problem.

我知道这是一篇旧帖子,但在搜索此问题时我没有找到其他内容。

In my case (Yosemite - 10.10.5), I found that

就我而言(优胜美地 - 10.10.5),我发现

System Preferences -> Keyboard -> Shortcuts -> Input Sources

was set to capture Ctrl+ space.

被设置为捕获Ctrl+ space

enter image description here

在此处输入图片说明

回答by prodigitalson

Did you try cmd+spaceand option+space? Also you should be able to change this key sequence by going to Eclipse > Preferences > General > Keys

你有没有尝试cmd+spaceoption+space?此外,您应该能够通过转到 Eclipse > Preferences > General > Keys 来更改此键序列

回答by Jose M Vidal

If you have emacs-bindings set up in eclipse, then the key is "option-/", not ctrl-space.

如果您在 eclipse 中设置了 emacs-bindings,那么关键是“option-/”,而不是 ctrl-space。

回答by j.barrio

On Eclipse Oxygen, on MacOS Sierra the shortcut is ctrl-.

在 Eclipse Oxygen 上,在 MacOS Sierra 上,快捷方式是 ctrl-。