简体   繁体   中英

How to edit syso or add a custom System.out.println(); in Eclipse?

So I mainly use a Mac with Eclipse and I know there is a shortcut to type System.out.println(); using syso CTRL+Space, but I was wondering if there is any way where I can change or add my own shortcut by just typing something like sysout and not have to press CTRL+Space, but instead just by pressing Space after sysout .

This is already supported. See this answer . sysout is the the template and you can just hit tab to complete it. No need for CRTL+space . If it's really important to you to use space rather than tab , you would need to update the key bindings under Preferences > General > Editor > Keys , but it may interfere with other key bindings so I wouldn't suggest you change that.

Preferences > General > Editor > Keys

  • In column "Command" Search for "Content Assist", select it
  • Below in "Binding" erase the content (ctrl+space), and just press space
  • PRESS OK
  • DONE

See the image, it is easy

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