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