Finally! I found how to get the keyboard shortcut for code completion working in Eclipse on Mac OS X. At work, on Linux, I use CTRL-SPACE all the time in Eclipse. Unfortunately that did not work on my MacBook: CMD-SPACE triggers the spotlight search widget and CTRL-SPACE is tied to the Quicksilver launcher in my case.
And there was much frustration.
First: don't say "code completion", but "content assist" in Eclipse. To bring even more confusion, there is also the "word completion" tool in the edit menu, but that's not what you normally want (it's just limited to completing a variable name without much context sensitivity). "Content assist" offers you the usual suggestions you expect from a completion tool (function names, variables, methods, properties, modules, ...).
Once I got this, it I just had to edit the keyboard shortcut for "content assist" to something that was still available (I chose ALT-SPACE).

And there was much rejoicing.
Thanks for this article. And
Thanks for this article.
And thanks to @Matt for how to disable spotlight shortcut :)
Carl.
To use CMD-SPACE for code
To use CMD-SPACE for code completion, turn off the Spotlight functionality:
1. Open System Preferences
2. Select Keyboard
3. Tap Keyboard Shortcuts tab
4. Click Spotlight
5. Deselect "Show Spotlight search field"
I also found a workaround for AUTOMATIC code completion:
1. Open Preferences in Eclipse
2. Type "Content Assist" into search box
3. For each Editor that you wish to have code completion:
a. Ensure "Enable auto activation" is checked
b. Put all characters into "Auto activation triggers for *" e.g.
.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789
c. Set "Auto activation delay" to 500 (or whatever works for you)
Enjoy!
Thank u
thank you very much for this interesting post
Thank you!
Thank you!
thank you so much! very
thank you so much! very helpful
Yesss!!! Thank you!!!:)
Yesss!!! Thank you!!!:)
Merci
Merci
Menu items in Eclipse Indigo
Hi,
Thanks a lot for such valueable information. I have one more question. I'am using Eclipse indigo on my macbook. Is there any option by which i can get menu items like File, Edit, Source etc in eclipse indigo on macbook? I 'am quite new to mac :)
Thanks
CTRL-F2
It's not as handy as under Windows or Linux, but you can get to the menu items with the key combo "CTRL-F2", and then navigate with the arrow keys.
Note however that the F2 key on your mac book is probably already tied to increasing the screen intensity. In that case you need to press the "fn" key in the lower left corner as well to have a "real" F2 key press, so you need the trio "CTRL-fn-F2".
more tricks: http://support.apple.com/kb/HT1343
good luck :)
Hallelujah
Thank you, thank you, thank you, thank you.
Post new comment