版权声明:本文为博主原创文章,转载请注明出处。 https://blog.csdn.net/fgszdgbzdb/article/details/83544479
Live Template
Export
- File – Export Settings
- make sure that the Live templates(schemes) check box is selected
- choose path to save jar file
- OK
Import
- File – Import Settings
- Specify the path to the JAR file with the exported live template configuration.
- select the Live templates(schemes) check box and click OK.
- After restarting IntelliJ IDEA, you will see the imported live templates
Customization
-
make new directory to save Exported setting.jar
such as: temConf
mkdir temConf
-
decompress jar file
jar -xvf setting.jar
-
delete setting.jar file
rm setting.jar
-
put your own template file (*.xml) in the subdirectory ‘templates’ of current Directory
note that: your .xml file format must same as other xml files in this directory
-
change directory to ‘temConf’ which you created at 1st step
cd config/
-
compress all files in this directory to .jar
jar -cvf new_setting.jar *
-
Import new_setting.jar as Section 2 Import
-
Restart IntelliJ IDEA
Reference
https://www.jetbrains.com/help/idea/sharing-live-templates.html