Transferring Intellij Live Templates Between Machines

我只是一个虾纸丫 提交于 2019-12-06 02:27:26

the technique of copying and pasting the xml file on another computer in the correct directory, function perfectly for me! But the name of my template file is android.xml for my Android developments. Maybe the file name "user" is protected. Try maybe with a different file name

You need to create the required custom template groups and update the relevant predefined groups as necessary and click OK. Based on these changes, IntelliJ IDEA generates the <group_name>.xml files, see Location of Custom Live Templates Definitions above.

Depending on the operating system you are using, the .xml files are stored at the following locations:

Windows: <your_user_home_directory>.IntelliJ IDEA<version_number>\config\templates
Linux: ~IntelliJ IDEA<version>\config\templates
OS X: ~/Library/Preferences/IntelliJ IDEA<version>/templates

Refer to Intellij Help article.

If you have Settings Repository set you may find your Live Templates stored in

<your_user_home_directory>\
  .IntelliJIdea<version>\
    config\
      settingsRepository\
        repository\
          templates

An improved and easier way

This allows you to share them easily between collegues.

You can select multiple live templates and then copy them (right click and select copy, or ctrl+c). This gives you XML-descriptions in your clipboard you can send to others.

Other can then take that XML, and paste it into a "Template Group". Right click one of the groups and select Paste. If the option is greyed out, you didn't select a group but something else.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!