Per project "File and Code Templates"

I've code templates (PHP) that differ from project to project. Mostly it's about which information to pre-fill in the PHPDOC right now.

Is there a way to separate those for different project? I can only find the setting under "IDE settings".


Comment actions Permalink

Hi there,

No -- templates belong to IDE-wide settings.

I may only suggest "File Template Variables" plugin that should do what you are asking -- provide default value for template variables.

Comment actions Permalink

I can't get the plugin to work.

In IDE Settings / File and Code Templates / Includes  / PHP Class Doc Comment I made this template:


and in Project Settings / File and Code Template Variables I created two variables:

Name: a
Value: test

Name  php.class.doc.comment.content
Valiue: * @author Some <>

But when I create a new class, it only looks like this:


I.e. the variables are ignored.

The documentation is quite sparse on how it's exactly supposed to work, any ideas?

Comment actions Permalink

Possibly it only works with actual File Templates but not with includes.

I mean -- it may not work if that template is used directly by IDE and not via "File | New"

In any case: please speak to the plugin author directly:


Please sign in to leave a comment.