简体   繁体   中英

How do I write System.out.println() with just ctrl + space in Eclipse?

I used to be able to write System.out.println() with just ctrl+space. Now I have to choose the proposal and press enter. So it's ctrl+space and enter now. It's just an extra key but pretty annoying.

I've tried restoring the preferences to default, but it hasn't worked.

As noted in the comment by XtremeBaumer :

Window > Preferences > Java > Editor > Content Assist

  • Check "Insert single proposals automatically"

Window > Preferences > Java > Editor > Content Assist > Advanced

  • In the top table, uncheck everything except "Template Proposals"

Verified in Eclipse for Java Developers, Version: 2022-12 (4.26.0)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM