Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

System.out.println() shortcut on Intellij IDEA

I know I can print System.out.println() with "sout" + tab. Is there a way I can do it with "Syso" + ctrl + space like in eclipse?

like image 585
m.rossi Avatar asked Oct 06 '22 05:10

m.rossi


2 Answers

In Idea 17eap:

sout: Prints

System.out.println();

soutm: Prints current class and method names to System.out

System.out.println("$CLASS_NAME$.$METHOD_NAME$");

soutp: Prints method parameter names and values to System.out

System.out.println($FORMAT$);

soutv: Prints a value to System.out

System.out.println("$EXPR_COPY$ = " + $EXPR$);
like image 141
Olga Avatar answered Oct 15 '22 18:10

Olga


Yeah, you can do it. Just open Settings -> Live Templates. Create new one with syso as abbreviation and System.out.println($END$); as Template text.

like image 25
Konstantin Labun Avatar answered Oct 15 '22 20:10

Konstantin Labun