Home >Development Tools >phpstorm >About CopyrightCopyright and Phpstorm

About CopyrightCopyright and Phpstorm

藏色散人
藏色散人forward
2021-06-19 17:25:493325browse

The following tutorial column will introduce you to Copyright and Phpstorm from the phpstorm tutorial column. I hope it will be helpful to friends in need!

When writing code, we often put the year of Copyright at the top of the code. If it is the New Year, our If the copyright information has not been updated, you will fall behind. However, manual updates or batch replacements will generate a lot of work or errors. In order to solve this problem, PHPStorm has an excellent solution which is the automatic copyright update mechanism (plug-in).

Add CopyrightCopyright

Enter settings

About CopyrightCopyright and Phpstorm

Search and find the copyright setting item (the new version of IDE has been integrated, no installation is required), if it is the old The version needs to search and install the copyright plug-in

About CopyrightCopyright and Phpstorm

Copyright parameters can be viewed at the official link:
Copyright Profiles

Set the copyright scopeScope

Not all files require the same copyright information. We add copyright in the required directory, which uses PHPstorm's Scope function.

First set the scope and set it to sharing mode

About CopyrightCopyright and Phpstorm

Search scope, find the setting item, select according to the folder, exclude and other settings, and finally check the Share Scope at the bottom

Set Copyright and Scope Association

Find the Copyright main setting item, add and associate it

About CopyrightCopyright and Phpstorm

Update Copyright

What needs to be noted here is that there is a search location in the copyright settings.

About CopyrightCopyright and Phpstorm

This One line means to find comments that match this rule according to the regular rules in the comments and update them to the current copyright. The default is Copyright because the string Copyright must exist in every copyright statement. If there is no such matching item in your file, the copyright information will be added at the bottom of the file.

We right-click the folder that needs to update the copyright information, so that the copyright information will be updated.

About CopyrightCopyright and Phpstorm

Settings in different languages

There will be different copyright information formats and comment formats in different languages. Different formatting information can be set according to multiple languages ​​in the menu items. Great experience

About CopyrightCopyright and Phpstorm


##

The above is the detailed content of About CopyrightCopyright and Phpstorm. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:segmentfault.com. If there is any infringement, please contact admin@php.cn delete