Eclipse System.out.println shortcut for Windows, Mac, and Linux

Ever since I wrote a post detailing a few important keyboard shortcuts in Eclipse last summer, I've been getting a surprising amount of search engine traffic all looking for one shortcut in particular: System.out.println(). Since this is such an important shortcut to know for debugging or writing Java in general, I decided to break it out into its own post.

The Shortcut


To use this shortcut, open up the Eclipse editor and navigate to the spot in the file where you would like to place this function. Now just type "syso", followed by CTRL + SPACE. Eclipse will magically fill out the full System.out.println() function call and place your cursor in between the parentheses, so that you can easily type in your desired output. This trick works exactly the same, whether you're on a Windows, Mac, or Linux version of Eclipse.

Note for Mac users


As I stated above, this shortcut uses the Control key, not the Command key that is more commonly used in other Mac applications for shortcuts. Command + Space opens up a Mac Spotlight Search prompt at the system level, so that shortcut wouldn't be available for Eclipse to use anyway.


Older:
FileZilla - Easily edit files on a remote server with your favorite local editor
Newer:
Comcast is definitely throttling Netflix, and it's infuriating