Say I type "sout", the intellisense should expand it to "System.out.println()". Is there a way to adding such templates?
Display and Edit the Current Keyboard Shortcuts To see the current key configuration and its keyboard shortcuts, choose the Eclipse > Preferences menu command to open the Eclipse workbench Preferences. Select the General > Editor > Keys page.
CTRL + Shift + L : "Show Key Assist", List of shortcuts (depending on the context)
The feature is called "code templates" in Eclipse. You can add templates with:
Window->Preferences->Java->Editor->Templates.
Two good articles:
Also, this SO question:
System.out.println()
is already mapped to sysout
, so you may save time by learning a few of the existing templates first.
Type "Sysout
" and then Ctrl+Space
. It expands to
System.out.println();
Type syso
and ctrl + space for System.out.println()
type "syso" and then press ctrl + space
OR
type "sysout" and then press ctrl + space
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With