Phpstorm support for ultra-strong language templates

Source: Internet
Author: User
Tags drupal

Original: [Turn]phpstorm support for super language templates

Recently encountered some problems with phpstorm programming:

    • When using the Zen coding plugin, Phpstorm is not as casual as notepad++. Phpstorm can use Zend Coding only if you are editing a file that is recognized as HTML.
    • When programming in Phpstorm, SQL statements about database operations are prompted accordingly.

So search phpstorm in writing PHP code, can switch a piece of code fragments to other programming languages.

In many projects, we often want to switch programming languages when programming, usually we need to embed a different programming language in the string of code. For example: Embed an HTML fragment in your PHP code, if you have a similar situation.

$htmlFragment variable is a piece of HTML code with some PHP variables and escaped strings.

In this case, it is not very good to use HTML code hints, such as <p></p> can not be directly through the auto-closing, such as a one-hit keyboard is a very menial thing.

Phpstorm programming language Switching

Phpstorm can recognize these situations, and it provides us with a full-featured HTML editor to edit existing strings:

We can also create a string and use the language switch (alt+enter) To manually specify the string to have another language:

This is a great little feature that completely improves programming efficiency. And this feature is available in all other languages.

This feature is completely convenient for me when editing PHP code using Zen Coding.

This article main reference article: Language injection in Phpstorm

At the same time, you can also learn about other Phpstorm programming techniques:

    • Phpstorm Integrated Drupal drush command line tool
    • Phpstorm Drupal Integration and development
    • Phpstorm shortcut key conflicts

Reprint Please indicate this article address:http://blog.lixiphp.com/phpstorm-language-injection/

Phpstorm support for ultra-strong language templates

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.