参考页面:https://www.jetbrains.com/help/webstorm/2016.2/enabling-emmet-support.html

Basics

Native Emmet support allows you to generate XML/HTML, JavaScript (JSX Harmony) and CSS structures based on abbreviations. WebStorm supports basic Emmet andEmmet version 1.1 features, such as:

  • New syntax for writing RGBA colors.
  • Implied attributes.
  • Default attributes.
  • Boolean attributes.
  • The Update Tag action.

Emmet is supported in HTML/XML, JavaScript (JSX Harmony) and in the CSS contexts. This support is configured separately on the HTMLJSX and CSS pages respectively.

Enabling and configuring native Emmet support in the HTML or XML context

  1. Open the Settings / Preferences Dialog by pressing Ctrl+Alt+S or by choosing File | Settings for Windows and Linux or WebStorm | Preferences for OS X. Expand the Editornode, and then click XML under Emmet. The Emmet page opens.
  2. To enable the Emmet support in the HTML or XML context, select the Enable XML/HTML Emmet check box.

    When this check boxes is cleared, all the other controls on this page become disabled.

  3. To have WebStorm show a pop-up window with a preview of the entered abbreviation before actually expanding it , select the Enable abbreviation preview check box.
  4. Specify how Emmet in WebStorm will treat URL addresses by selecting or clearing theEnable automatic URL recognition while wrapping text with <a> tag check box.
    • If this check box is cleared and you attempt to wrap an URL address with the <a> tag, WebStorm simply encloses the URL address in <a href=""></a> and positions the cursor inside the double quotes in the href attribute. For example, wrappinghttp://www.jetbrains.com will result in <a href="|">http://www.jetbrains.com</a>:
    • If this check box is selected and you attempt to wrap an URL address with the <a> tag, WebStorm inserts the URL address inside the double quotes as the value of the hrefattribute and encloses the URL in <a href="<wrapped URL>"></a>. For example, wrappinghttp://www.jetbrains.com will result in <a href="http://www.jetbrains.com">http://www.jetbrains.com</a>. Moreover, WebStorm highlights the wrapped URL green as a recognized URL:

Enabling native Emmet support in the JavaScript context

  1. Open the Settings / Preferences Dialog by pressing Ctrl+Alt+S or by choosing File | Settings for Windows and Linux or WebStorm | Preferences for OS X.
  2. Under the Languages and Frameworks node, click JavaScript, and select the language level JSX Harmony.
  3. Expand the Editor node, and then click JSX under Emmet. The JSX page opens.
  4. To enable the Emmet support in the JavaScript context, select the Enable JSX Emmetcheck box.

Enabling and configuring native Emmet support in the CSS context

  1. Open the Settings / Preferences Dialog by pressing Ctrl+Alt+S or by choosing File | Settings for Windows and Linux or WebStorm | Preferences for OS X. Expand the Editornode, and then click CSS under Emmet. The CSS page opens.
  2. To enable the Emmet support in the CSS context, select the Enable CSS Emmet check box.

    When this check boxes is cleared, all the other controls on this page become disabled.

  3. Configure the way unknown abbreviations are treated by selecting or clearing the Enable fuzzy search among CSS abbreviations check box: When this check box 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:
    • ov:h
    • ov-h
    • o-h
    • oh
  4. Configure the way unrecognized properties are treated by selecting or clearing theEnable expansion of unknown properties ('unknown' to 'unknown:;') check box:
    • When this check box is selected, any entered word will be expanded into the same word followed with a colon and a semicolon;
    • When this check box is cleared, only known properties (for example, color) will be expanded this way (color:;)
  5. Configure inserting browser-specific prefixes using the Auto insert CSS vendor prefixescheck box: If this check box 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 check box is cleared, the entire table of properties is disabled.

  6. Configure the use of properties in different browsers using the Properties and vendor prefixes table. The table contains a list of CSS properties and vendor prefixes that correspond to various browsers.
    • To enable or disable a property in a browser, select or clear the check box under the browser column.
    • To add a new property to the list, click the Add button  or press Alt+Insert. Then type the name of the property in the dialog box that opens and enable it in the relevant browsers.
    • To delete one or more properties from the lsit, select them and press Remove  or press Alt+Delete.

当前我设置的快捷键为 ctrl+shift+alt+e

webstrom 中启用emmet插件的方法的更多相关文章

  1. Zend Studio 中安装emmet插件的方法

    本人的Zend Studio版本是Zend Studio 10.0.0. 1. 打开Zend Studio,点击 Help --> Install New Software,如下图: 2.  在 ...

  2. Emmet插件使用方法总结

    Emmet插件使用方法总结 在前端开发的过程中,一大部分的工作是写 HTML.CSS 代码.特别是手动编写 HTML 代码的时候,效率会特别低下,因为需要敲打很多尖括号,而且很多标签都需要闭合标签等. ...

  3. Sublime Text3 Package Control和Emmet插件安装方法

    因为初学前端,所以今天安装了Sumblime Text 3,然后就停不下来去找Package Control的安装方法. 网络上我找到并尝试过的方法有两种,我使用的是用Python代码去安装并成安装成 ...

  4. Atom编辑器中安装Emmet插件失败的问题

    今天使用Atom编辑器安装Emmet插件的时候,刚开始的时候报错: 报错内容如下: Installing “emmet@2.4.3” failed.Show output… Compiler tool ...

  5. 在Eclipse中安装python插件的方法

    一个博士给了我一堆代码,原本以为是C++或者java写的,结果是python,我压根没学过呀,不过本着语言都是相通的原则,我硬着头皮开始学习Python,当然先学习安装IDE(以前学习一门新语言,我会 ...

  6. visual studio code中使用emmet插件在.vue文件失效

    使用visual studio code编辑.vue文件时,emmet插件无法使用,可以通过以下两种试解决: 1.文件→设置,在右侧窗口添加以下代码: "emmet.syntaxProfil ...

  7. zend studio中安装Emmet插件后迅速编写html的方法

    table>tr*3>th*1+td*3h1{hello}            <h1>hello</h1>a[href="xx.xxx.xxx(网址) ...

  8. APPCAN IDE中安装emmet插件

    1.首先打开APPCAN IDE 2.帮助(help)-安装新软件(install New sofaWare) 3.打开Install窗口,点击 Add,在Add Repository窗口中,Name ...

  9. sublime text3 jQuery Emmet 插件 安装方法,快捷键

    preference->package control->install package> emmet / jQuery 先说jQuery jQuery 集成了很多JS的补全功能.例 ...

随机推荐

  1. js制作倒计时效果

    该程序可以计算任意指定的两个日期中间的差值. 本例子的指定日期是2017年1月1日,当前时间是2016年10月21日:计算它们之间的差值,在网页上显示如图所示: 关键部分代码: var nowtime ...

  2. 《TCP/IP详解 卷一》读书笔记-----动态路由协议

    1.以下条件只要有一个不满足,则需要使用动态路由协议:1)网络规模小,2)只有一个连接点用于连接其他网络,3)没有冗余的路由器(一般用作备份) 2.所谓动态路由就是各个路由器与自己相邻的路由器交换各自 ...

  3. 【温故而知新-Javascript】使用数组

    Javascript 数组的工作方式与大多数编程语言的数组类似. <!DOCTYPE html> <html lang="en"> <head> ...

  4. OpenCV 之 数字图像

    1  数字图像 数字图像可看作一个数值矩阵, 其中的每个元素代表一个像素点,如下图所示: 2  存储 M行N列图像的存储位数: b = M * N * k   ( L=2k, l ∈ [0, L-1] ...

  5. HDU 1251 统计难题

    字典树又一基本题 代码: #include <iostream> #include <cstdio> #include <cstring> #include < ...

  6. c#中结构体(struct)和类(class)的区别

    一.类与结构的示例比较: 结构示例: public struct Person { string Name; int height; int weight public bool overWeight ...

  7. .Net core Linux环境安装

    10月份的时候在自己电脑上搭了开发环境,当时跑完Welcome后就搁置了一段时间,最近有一个小项目要正式采用core来开发并部署在linux环境下,于是在Linux上也搭建一个运行环境. 虽然不经常使 ...

  8. treepanel加滚动条

  9. [Usaco2008 Nov]mixup2 混乱的奶牛 简单状压DP

    1231: [Usaco2008 Nov]mixup2 混乱的奶牛 Time Limit: 10 Sec  Memory Limit: 162 MBSubmit: 685  Solved: 383[S ...

  10. cobbler

    原理: http://www.cnblogs.com/mchina/p/centos-pxe-kickstart-auto-install-os.html 一键脚本 http://tshare365. ...