Creating code snippet shortcut

I'm new to IDEA and am sure I can do this but have not discovered how.

I want to be able to create my own code completion templates or snippets.  For example if I enter println I would like for it to become System.out.println or do the same some other way.  Please point me in the right direction.  I think I'm having a terminology problem with the documentation and tool.

thanks

Eric

3 comments
Comment actions Permalink

In IDEA this functionality is called 'Live Templates'. See File | Settings | Live Templates.
By the way there's already standard template for System.out.println(): type 'sout' or 'soutv' anywhere in Java code and press Tab to expand template. To see all templates available in current context press Ctrl+J (Meta+J on Mac)

0
Comment actions Permalink

Hello Eric,

Settings | Live Templates is what you need.

I'm new to IDEA and am sure I can do this but have not discovered how.

I want to be able to create my own code completion templates or
snippets.  For example if I enter println I would like for it to
become System.out.println or do the same some other way.  Please point
me in the right direction.  I think I'm having a terminology problem
with the documentation and tool.


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Thanks all,

that is what I was looking for. Much appreciate the help.

0

Please sign in to leave a comment.