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文檔

相關文章
相關標籤/搜索