How do I change the default copyright per project?
I am working in several projects with phpStorm and all of them has different copyright at the top of each new file. How I can customize this per project? Any time I create a new `*.php` file I get this:
/**
* Created by PhpStorm.
* User: reynierpm
* Date: 1/20/2016
* Time: 6:50 PM
*/
And I would like to change for something like:
/**
* This file is part of the <current_project_name> project.
*
* @author <fullname> <email_address>
* @copyright (c) Dynamo Technology Solutions
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
But I need to write this on each file whether it's new or old, any advice on this?
请先登录再写评论。
Hi there,
The "copyright" from your code example is taken from File Templates -- you can edit it at "Settings/Preferences | Editor | File & Code Templates". It may not be in the actual file template directly but included via separate file (e.g. "PHP File Header" from "Includes" tab -- if we are talking about PHP files here) -- you can edit those templates as you wish.
Note that you can choose if you will be editing Global or Project-specific template (the "Schema" dropdown in top right corner). I'm just not sure how well it works (the project-specific part) because of this ticket: https://youtrack.jetbrains.com/issue/IDEA-134746
BTW -- in PhpStorm v11 (currently at EAP stage) there is dedicated (and much better) Copyright plugin -- try it (v11 can be run in parallel to v10 as it stores global settings in separate folders):
Excellent, it works I will test the EAP also