Phpstorm Emmet
PhpStorm is a PHP IDE which keeps up with latest PHP & web languages trends, integrates a variety of modern tools, and brings even more extensibility with support for major PHP frameworks. I hoped that PhpStorm 8 will fix bad processing of complex (but correct) Emmet constructions (I am using PhpStorm 7.1.3), however yesterday I tried WebStorm 8.0.4 and understood that situation is the same: nobody cares about Emmet in.Storm. Ejemplo de uso de Emmet con phpStorm.
On this page, configure Emmet preferences for HTML, XML, JavaScript (JSX Harmony) files and Style Sheets.
PhpStorm expands abbreviations only if their output does not exceed 15 KB.
Item | Description |
---|---|
Expand abbreviation with | From this list, select the default key to expand Emmet selectors with. This key will also by default expand Emmet live templates. |
Emmet.HTML
Item | Description |
---|---|
Enable XML/HTML Emmet | Select this checkbox to enable Emmet support for XML and HTML. If this checkbox is not selected, complicated abbreviations, such as div.class>ul#list>.item$) and similar, will not work in the editor. |
Enable abbreviation preview | Select this checkbox to have PhpStorm show a popup with a preview of the entered abbreviation before actually expanding it. |
Enable automatic URL recognition while wrapping text with <a> tag |
|
Add edit point at the end of template | If this checkbox is selected, an editing position adds to the end of an HTML template ($END$); Compare the following: |
BEM | In this area, specify the BEM separators for the class names, modifiers and short elements. Refer to the Emmet documentation for details. |
Filters enabled by default | In this area, specify which Emmet filters you want to be applied to an expanded abbreviation before it is shown in the editor. Learn more about filters at http://docs.emmet.io/filters/. To have a filter always applied by default, select the checkbox next to it. The available options are: |
Emmet.CSS
Item | Description |
---|---|
Enable CSS Emmet | Select this checkbox to enable Emmet support for Style Sheets. If this checkbox is not selected, the complicated abbreviations, like bdci:n expanding into border-corner-image: none; , will not work in the editor. |
Enable fuzzy search among CSS abbreviations | When this checkbox is selected, every unknown abbreviation will be scored against available template names. The match with the best score will be used to resolve the template. For example, with this option enabled, the following abbreviations can be equal to:
|
Enable expansion of unknown properties ('unknown' to 'unknown:;') |
|
Auto insert CSS vendor prefixes | If this checkbox is selected, the CSS properties listed in the table below are expanded into constructs that contain pre-pending vendor prefixes. Learn more at Vendor prefixes. If this checkbox is cleared, the entire table of properties is disabled. |
Properties and vendor prefixes | The table contains a list of CSS properties and vendor prefixes that correspond to various browsers.
|
Emmet.JSX
Item | Description |
---|---|
Enable JSX Emmet | Select this checkbox to use Emmet within XML fragments in the JSX Harmony context. |
Emmet (formerly Zen Coding[1]) is a set of plug-ins for text editors that allow for high-speed coding and editing in HTML, XML, XSLT, and other structured code formats via content assist. The project was started by Vadim Makeev in 2008[2] and continues to be actively developed by Sergey Chikuyonok and Emmet users. Since 2015 Mikael Geletsyan[3] is responsible for UX at Emmet. The tools have been incorporated into several popular text editors, as well as some plug-ins developed by the Emmet team and others implemented independently. However, Emmet is primarily independent from any text editor, as the engine works directly with text rather than with any particular software.[4]
Emmet is open sourced under the MIT License.
Phpstorm Emmet Php
Name[edit]
Emmet is a word that originally meant ant, a small insect that can carry over 50 times of its weight. This word is also similar to 'emit,' which is basically what Emmet does when it expands abbreviations.
Functions[edit]
Expand abbreviations[edit]
Emmet uses a specific syntax in order to expand small snippets of code, similar to CSS selectors, into full-fledged HTML code.[5] For example, the sequence
div#page>div.logo+ul#navigation>li*5>a
or
#page>.logo+ul#navigation>li*5>a
expands into
The expand abbreviations function includes several other complex functions, such as wrapping a section of code with expanded code.[6]
Tag balancing[edit]
The HTML Pair Matcher allows users to locate the matching open/close tag for the tag at the current cursor position. Unlike other HTML pair matchers, Emmet searches from the cursor's current position rather than scanning the document from the beginning.[7]
Text editors[edit]
The plug-ins for following text editors were developed by the Emmet team
- Aptana/Eclipse (cross-platform).
- Notepad++ (Windows)
- NetBeans (cross-platform)
- TextMate (Mac)
- Coda (Mac)
- Komodo Edit/IDE (cross-platform)
- PSPad (Windows)
- <textarea> (browser-based)
- Bluefish (Linux/Windows/Mac)
- Brackets (cross-platform)
The following text-editor plug-ins were developed by third-party groups with the official Emmet engine
- Atom (cross-platform)
- Dreamweaver (Windows, Mac)
- Sublime Text (cross-platform)
- Visual Studio (Windows)
- Visual Studio Code (cross-platform)
- gedit (cross-platform)
- AkelPad (Windows)
- UltraEdit (Windows)
- TopStyle (Windows)
- BBEdit/TextWrangler (Mac)
- EmEditor (Windows)
The following text editor plug-ins were developed independently and with a different Emmet engine
Phpstorm Emmet Shortcuts
Phpstorm Emmet Sullivan
- Emacs (cross-platform)
- IntelliJ IDEA/WebStorm/PhpStorm (cross-platform)
- RJ TextEd (Windows)
- Tincta Pro (Mac)
- Vim (cross-platform)
References[edit]
- ^Rocha, Zeno (March 26, 2013). 'Goodbye, Zen Coding. Hello, Emmet!'. Smashing Magazine. Smashing Magazine GmbH. Retrieved March 15, 2015.CS1 maint: discouraged parameter (link)
- ^'Zen HTML — Пепелсбей.net'. pepelsbey.net.
- ^'Credits'. emmet.io. Retrieved 2018-11-27.
- ^'Zen Coding: A Speedy Way To Write HTML/CSS Code'. 21 November 2009.
- ^'The Art of zen-coding: Bringing Snippets to a New Level'. mondaybynoon.com.
- ^'If you code HTML, Zen Coding will change your life'. 22 January 2013. Archived from the original on 22 January 2013.CS1 maint: discouraged parameter (link)
- ^'Zen Coding: A Speedy Way To Write HTML/CSS Code'. 21 November 2009.