Home  >  Article  >  Development Tools  >  How to use regions in PHPStorm (code folding)

How to use regions in PHPStorm (code folding)

藏色散人
藏色散人forward
2021-06-21 17:24:583101browse

The following tutorial column will introduce to you how to use region (code folding) in PHPStorm. I hope it will be helpful to friends in need!

Using regions (code folding) in PHPStorm

How to use regions in PHPStorm (code folding)

People who use VS to write C# like it very much

#region

Implemented code folding functionality. PHP itself does not have similar functions, but as a PHPer, I am definitely not willing to show weakness on this point. This article introduces the use of the most powerful PHP IDE in history - PHPStorm to achieve code folding (note: not necessarily a function or a class).
In fact, after all the nonsense mentioned above, the text only has three lines:
//region description
code....
//endregion
If someone wants to say that there is no picture, just say G8, okay, I will post a picture:

Expand rendering:

Collapse rendering: How to use regions in PHPStorm (code folding)

Note: Only valid under PHPStorm. Of course, not only PHP Code is supported, but js Code is also supported. How to use regions in PHPStorm (code folding)

The above is the detailed content of How to use regions in PHPStorm (code folding). 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