'In IntelliJ Idea, can I manage code / file templates in Version Control?
I'm trying to determine if my organization can essentially manage and share an IntelliJ file template library across Git.
As far as I can tell, the only way to share these templates is by Import/Export Settings with .jar files, but I don't see how I can have this be automatically managed via VCS.
UPDATE:
Just found a plugin which looks like it might do what I want:
IntelliJ Configuration Server Plugin
Update 2:
Tinkered with this for a little bit, and read the comments. It seems kind of hokey - and sounds like its pretty buggy. It looks like I'll just be sharing .jars until IntelliJ comes up with a better solution.
As suggested by Mark Vedder, I've voted on "Make file templates per-project" in the IntelliJ ticket tracker, and so should you if you want to see a nicer solution to this.
Solution 1:[1]
This is now possible the ticket has been solved. Just change Scheme to "Project" rather then "Default" when in the "File and Code Templates" dialog. The files will appear under ".idea\fileTemplates". Unfortunately it seems the only way to transfer files is by copying from the dialog and swapping schemes.
Solution 2:[2]
The only way you could do this would be to put the directory where file templates are stored under version control. That directory is the config/fileTemplates directory. See the document IntelliJ IDEA files locations (caches, plugins, logs) on different operating systems for the location of IntelliJ IDEA's config directory.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Ben |
| Solution 2 | Javaru |
