PHPstorm usage tips

Source: Internet
Author: User

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.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.