The plugin allows to share custom IntelliJ IDEA live templates with a team by putting them to .idea/liveTemplates
folder.
- Create custom live template group in Settings and add live templates there. Press
OK
to save the changes.
- Invoke the
Share Custom Live Templates
action fromGo to Action
(Ctrl/Cmd + Shift + A
) - After action successfully executed, live templates should appear in the
.idea/liveTemplates
folder - Commit shared live templates to the repository
Everybody with plugin installed who opens repository will import project live templates automatically when they open project next time.
There is the action to import live templates manually.
Invoke the Import Project Live Templates
action from Go to Action
(Ctrl/Cmd + Shift + A
)
The plugin works by copying shared live templates groups to the IDE settings.
Technically when a project with shared live templates is opened the plugin will add groups from .idea/liveTemplates
to the IDE settings.
And when the project is closed copied templates will be removed from IDE settings.
- If you open multiple projects and some of them contain templates with the same name, only first loaded project's templates with the same name will be used.
- The plugin supports only custom live templates group. If you add live templates to predefined groups, they will not be shared.