Reputation: 476
I have been having this problem for a while and I have been constantly searching for an answer everywhere and finally chose to just ask it here. All the other posts I have seen don't fix my problem and I have tried doing the following:
Changed the binding of the shortcut
Made sure that is was checked under templates
Made sure all my settings were correct
Autocompletion on
When I type syso
and press Ctrl + Space, instead of instantly giving me the insertion or shortcut I want, it just opens the 'Intelligent Proposals' menu and I have to press Ctrl + Space again in order to get to the 'Template Proposals' menu where I can actually double click "'syso' - print to standard out" and then it gives me the full System.out.println
. It really does mess with flow and is very annoying.
Any fixes to my problem? Thanks,
Upvotes: 3
Views: 30187
Reputation: 11
Go to Windows>Preferences>Editor>Content Assist>Advanced and select the checkboxes for 1.Java proposals, 2.SWT Template proposals and 3.Template proposals. Now your shortcut for syso and ctrl+space will work. This worked for me, I hope it helps you too.
Upvotes: 0
Reputation: 1154
I had the same symptom with eclipse 2021-06.
I discovered that the template named "syso" was gone.
Recreating "syso" worked.
Upvotes: 1
Reputation: 29
In Eclipse you should use sysout then ctrl + space. in windows and command + space in mac.
Upvotes: 0
Reputation: 512
Can you check this out
Upvotes: 1
Reputation: 1
Only for those who are using eclipse editor;
Check you are using syso -> ctrl+space in a valid coding area. I mean, you can't have a SOP statement inside class, it can be inside a function only, i.e. either inside main()
or any user defined methods.
Upvotes: -1
Reputation: 1
I have both Chinese and English language input. Ctr + space could also mean switch language input. So make sure you are under English input
Upvotes: -1
Reputation: 1
sysout
Ctrl + space
sysout-print
to standard out option.Upvotes: -2
Reputation: 306
I was facing the same problem and figured it out after playing around with some settings. So, here's what you should do:
Hope it helps.
Upvotes: 10
Reputation: 1
Go to Windows-Preferences-Java-Editor-Templates
Also, if it still does not work for you, go to Windows-Preferences-Java-Editor-Content Assist -Favorites
Here, press "New Type" -enter: System.out.println(); , press OK , press Apply.
I hope it helped! :)
Upvotes: 0
Reputation: 81
I had exactly the same problem in Eclipse with the 'Template Proposals' menu popping up instead of completing the sysout shortcut. In my case, a plug-in installed recently was to blame. I unchecked all the templates for the plug-in in Preferences/(plug-in)/Templates - and this did the trick for me. Now the selection menu doesn't pop up any more, and syso + CTRL-SPACE works again as it should.
Upvotes: 2
Reputation: 7623
In my case it didn't work because ctrl+space was being used by another program Ubuntu(I-Bus) in my case ref. here Try changing ctrl-space by another key combination in general->keys to find out if this is causing the problem and try sysout instead.
Upvotes: 0
Reputation: 8849
Check this. Select any string then press Ctrl + Space eclipse detects the context.
Upvotes: 1