Expand "sys" to "System.err.println" with control-space

I've just recently started using Eclipse a lot, and I just typed System.err.println() one more time than I cared to. I just looked it up, and Eclipse also has templates, and one of the pre-built templates lets me type sys, then hit the [Ctrl][Spacebar] keystroke. This brings up a list of options I can choose from, one of those options being to insert the System.err.println() text in place of my sys text.

While I'm in the Eclipse Template neighborhood, you can view and customize your Eclipse templates by opening the Preferences dialog (on a Mac, choose the Eclipse menu, then the Preferences menu item), then selecting Java >Editor >Templates in the navigation tree of the Preferences dialog.

Share it!

There’s just one person behind this website; if this article was helpful (or interesting), I’d appreciate it if you’d share it. Thanks, Al.

Add new comment

The content of this field is kept private and will not be shown publicly.

Anonymous format

  • Allowed HTML tags: <em> <strong> <cite> <code> <ul type> <ol start type> <li> <pre>
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.