IDEA - Live Template

设置 Live Template

File -> Settings -> Editor -> Live Templates 下能够设置 Live Templatesgit

Mac 下是 IntelliJ IDEA -> Preferences -> Editor -> Live Templatesgithub

通常经常使用的是 output 中进行设置输出模板,这里列举一些本人经常使用的:.net

sop -> System.out.println($END$);

psvm -> 
public static void main(String[] args){
  $END$
}

psfi ->
public static final int $var1$ = $var2$;

psfs ->
public static final String $VAR1$ = "$VAR2$";

ps -> private String $VAR1$ = "$VAR2$";

psc ->
/**
 * $VAR1$
 */
private String $VAR2$ = "$VAR3$";

pi -> private Integer $VAR1$ = $VAR2$;

pic ->
/**
 * $VAR1$
 */
private Integer $VAR2$ = $VAR3$;

参考文档

https://blog.csdn.net/cgl125167016/article/details/78732957code

https://github.com/judasn/IntelliJ-IDEA-Tutorial/blog

https://github.com/aqair/note/blob/master/%E7%BC%96%E7%A8%8B%E5%B7%A5%E5%85%B7%E4%B9%8B%EF%BC%9AIntelliJ%20IDEA.md文档

相关文章
相关标签/搜索