在 File -> Settings -> Editor -> Live Templates
下能夠設置 Live Templates
git
Mac 下是 IntelliJ IDEA -> Preferences -> Editor -> Live Templates
github
通常經常使用的是 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