PHPStorm different file templates for every new project? Follow
Hey everybody,
Currently I'm working on a couple of projects (not related with each other).
Whenever I need to create a file from template I start wondering if that template was the right one...
I'm wondering if there is a way to set file templates per project ? A plugin, maybe ?
Thanks in advance,
tftd
Please sign in to leave a comment.
This is not available - "file templates" is a per-IDE-instance setting.
You can file a feature request, however we do not plan to work on this very soon.
I was having this same annoyance and came up with somewhat of a solution. Stumbled on this post and figured I'd share:
Basically, I created a file in the includes section named "Project.php". In there, I set any variables that are specific to the project at hand. So for my current project for instance, I have:
And then, at the top of all my file templates, I have the following:
I set the variables to themselves in the main template file as well, because if you don't, the IDE will continue to prompt you for those variables (though if you leave them blank, it will use whatever's in Project.php
Not much of a solution, but it does allow you to edit just one file when you start a new project.
Hello tftd,
Please vote - http://youtrack.jetbrains.net/issue/IDEA-27486
Thank you for feedback!