PHPstorm usage tips
Update slowly and accumulate a little bit. Problems Encountered during use
Settings:(2016.4.15)
1: annotation template. phpstorm has a very powerful annotation template, which can be changed at any time as needed and set shortcuts, which is very convenient.
New File commentPHP File Header
<?php/** * Created by PhpStorm. * User: Administrator * Date: 2016/4/13 * Time: 22:44 */
Class AnnotationPHP Class Doc Comment
/** * Class index * * @package application\controller * @VERSION 1.3 * @AUTHOR mask */class index extends controller{
Function commentsPHP Function Doc Comment
/** Get the configuration class object * author: stubborRookie ** @ return config * version: 1.3 */public static function config () {return new config ();}
Customize your own template:
File-> setting-> editor-> File and code Templates
You can set different display fields according to the rules.
Custom field:
When using your own name in annotations$ {USER}But this is the computer name by default. How can I change it to my own name?
AvailableIncludesTab, and then click the upper left corner of the Panel+Create a new template named: PHP define (customizable) Extension php
Then write the following code in it:
#set ($VERSION="1.3")#set ($USER='stubbornRookie')
Define a variable and assign values. Introduce the variable in the template that needs to be used, for example:
#parse("PHP define.php")/** author = ${USER}** version =${VERSION}*/
That's all!
Enter/**Then pressCtrl + enterThe comments are automatically completed!
Editor font
You can set them in the editor. You need to copy the settings to set them.