Emmet Documentation

Actions

Expand Abbreviation

Balance

选择范围

Go to Matching Pair

匹配对应标签

在sublime text 3中似乎被覆盖了。

Wrap with Abbreviation

Wrapping individual lines

    About
News
Products
Contacts

shift+ctrl+A

nav>ul.nav>li.nav-item$*>a
<nav>
<ul class="nav">
<li class="nav-item1"><a href="">About</a></li>
<li class="nav-item2"><a href="">News</a></li>
<li class="nav-item3"><a href="">Products</a></li>
<li class="nav-item4"><a href="">Contacts</a></li>
</ul>
</nav>

Note you don’t need to add multiplier number for wrapping lines (e.g. li*5), you have to use * operator withoutnumber, like this: li*.

Removing list markers

You can let Emmet do this for you: simply add “trim“ (|t, pipe-t) filter to abbreviation to automatically remove list markers from wrapped content:

1. Ordered item 1
2. Ordered item 2
3. Ordered item 3

shift+ctrl+A

nav>ul.nav>li.item$*>a|t
<nav>
<ul class="nav">
<li class="item1"><a href="">Ordered item 1</a></li>
<li class="item2"><a href="">Ordered item 2</a></li>
<li class="item3"><a href="">Ordered item 3</a></li>
</ul>
</nav>

Controlling output position

You can control the output position with $# placeholder. Note that $# is not part of the abbreviation syntax, so you have to put it inside the attribute value or text node, like this: ul>li[title=$#]*>{$#}+img[alt=$#].

<ul>
<li title="About">About<img src="" alt="About"></li>
<li title="News">News<img src="" alt="News"></li>
<li title="Products">Products<img src="" alt="Products"></li>
<li title="Contacts">Contacts<img src="" alt="Contacts"></li>
</ul>

Go to Edit Point

Select Item

Toggle Comment

Split/Join Tag

This action splits and joins tag definition, e.g. converts from <tag/> to <tag></tag> and vice versa. Very useful for XML/XSL developers.

Remove Tag

Merge Lines

文字合并成一行

在sublime text 3中似乎被覆盖了。

Update Image Size

This action helps you to automate this process: simply place caret inside <img> tag and run this action to add/update width and height attributes.

In CSS, place caret inside property value with url() function to add/update width and height properties for current rule.

Evaluate Math Expression

3*4
12

Increment/Decrement Number

Reflect CSS Value

    -webkit-transform: rotate(60deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);

ctrl+B

    -webkit-transform: rotate(60deg);
-moz-transform: rotate(60deg);
-ms-transform: rotate(60deg);
-o-transform: rotate(60deg);
transform: rotate(60deg);

Encode/Decode Image to data:URL

body {
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAARCAYAAADdRIy+AAAB0UlEQVQ4y2P4z8DAQCoGgjwgVsIqR46BwoJMt7i5GPeBmFQxUFWR5R6IycHOuB5Ii6C5niENiDORcAVID5ICDSCOB+IGIO4G4lwBPqY3MDOAhq5DNhTDkYL8TE+jArgcgGwWIC5iZ2O8TsjRnByMa4G0ENhARkaGf6JCTJ/rCviOg/DeFaKdz85IibCyMM4lJSSALl0Ld6GCDMszoCEaUMzFwszQSmrQ8nIzfgDqFQcbKC3B/BQpDFT4+Zieo2vg4mT8KSLE9AUYuz+BvkKRk5Vi/jC7S2gp0EApsIEykszPYLJaaqwZbGyMv0BckOYwH64r2xeJrrm0S2IGEPcC8TQ1JZZXMMM0VVhfbVsk2g80TAKIGTEM1NdinQliApPGmyWThJcDFXkDMQ+yk+SkmB+AmBZGbI9ObBKvAcpzo8QysoHGemwbgAofn9sGViiGLcCALrzrYMl+7+EJyRSgGmb0dIhiYGsZf+XRdWL5QIVMuGKgvpBvzp3DkvFQA3zwGggKWCBmxRelQHkVqOZ2YPL6iGGgvDTzYzILif+SYszvUcSYmRj+AnPDdyBzM6kYlHzERZnfYLiQEgwsed6hGAgMj/lADEqUK8jAS4C4A9lAAFHbei84vFYeAAAAAElFTkSuQmCC);
}

Filters

Now, try to expand this abbreviation: #content>p.title|e. You’ll have a slightly different result:

&lt;div id="content"&gt;
&lt;p class="title"&gt;&lt;/p&gt;
&lt;/div&gt;

#content>p.title|e|e

&amp;lt;div id="content"&amp;gt;
&amp;lt;p class="title"&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;

#content>p.title|haml

#content
%p.title

Implicit filter call

Default filters are defined in snippets.json file in filters section of each syntax:

{
...
"html": {
...
"filters": "html"
}
}

Available filters

HAML syntax: haml

HTML syntax: html

Escape: e

Comment tags: c

div>div#page>p.title+p|c

...will be expanded into

<div>
<div id="page">
<p class="title"></p>
<!-- /.title -->
<p></p>
</div>
<!-- /#page -->
</div>

XSL tuning: xsl

Single line: s

ul>li*4|s

...will be expanded into

<ul><li></li><li></li><li></li><li></li></ul>

Trim line markers: t

Yandex BEM/OOCSS

Customization

snippets.json

Add your own or update existing snippets

preferences.json

Change behavior of some Emmet filters and actions

syntaxProfiles.json

Define how generated HTML/XML should look.

Cheat Sheet

Emmet Documentation ( Actions+Filters+Customization )的更多相关文章

  1. Emmet Documentation

    src:http://docs.emmet.io/cheat-sheet/ Emmet Documentation Syntax   Child: > nav>ul>li <n ...

  2. Filters in ASP.NET Core (转自MSDN)

    Filters in ASP.NET Core MVC allow you to run code before or after specific stages in the request pro ...

  3. 一些参考网站 - Reference Documentation - Website Address

    Reference Documentation - Website Address MSDN Visual Studio 2015官方文档 https://msdn.microsoft.com/zh- ...

  4. emmet高级技巧

    编写好HTML和CSS代码时,我们也需要修改或添加一些内容,Emmet提供了很多非常独特的工具,可以大大提高编辑体验,下面我们挑选几个常用的功能来介绍. 萨龙龙发现在sublime text中安装的E ...

  5. http://www.zhihu.com/question/24896283

    http://www.zhihu.com/question/24896283 Rix Tox,太不專業了 三百.知乎用户.raintorr 等人赞同 1. 更改变量名的几种方法这种情况下该如何快速选中 ...

  6. WEB/HTTP 调试利器 Fiddler 的一些技巧分享

    1.原理简介: Fiddler 是目前最强大最好用的 Web 调试工具之一,它能记录所有客户端和服务器的http和https请求, 允许你监视,设置 CGI 请求的断点,甚至修改输入输出数据.同类的工 ...

  7. Sublime Text生成html标签快捷键

    Emmet Documentation Syntax   Child: > nav>ul>li <nav> <ul> <li></li> ...

  8. javaScript hook

    今天在网上搜索了不少资料,基本概念如下: 钩子(Hook),是Windows消息处理机制的一个平台,应用程序可以在上面设置子程以监视指定窗口的某种消息,而且所监视的窗口可以是其他进程所创建的.当消息到 ...

  9. Sublime Text 有哪些使用技巧

    1. 更改变量名的几种方法&lt;img src="https://pic4.zhimg.com/d93cf0e8987e0117f3a3187cfe8e53fb_b.jpg&quo ...

  10. Asp.net mvc 知多少(四)

    本系列主要翻译自<ASP.NET MVC Interview Questions and Answers >- By Shailendra Chauhan,想看英文原版的可访问http:/ ...

随机推荐

  1. win32 - 将控制台输出重定向到txt文本上

    这里需要两个app. parent.cpp #include <Windows.h> #include <stdio.h> int main() { SECURITY_ATTR ...

  2. win32-UI Automation

    使用UI Automation遍历窗口的所有控件标题和类 #include <Windows.h> #include <stdio.h> #include <UIAuto ...

  3. CSDN的Markdown编辑器使用说明

    这里写自定义目录标题 欢迎使用Markdown编辑器 新的改变 功能快捷键 合理的创建标题,有助于目录的生成 如何改变文本的样式 插入链接与图片 如何插入一段漂亮的代码片 生成一个适合你的列表 创建一 ...

  4. windows下的批处理bat文件和Linux下的shell文件的含义

    原文:https://www.cnblogs.com/caiguodong/p/10308255.html shell(Linux.Solaris) bat(windows) 含义 # rem 注释行 ...

  5. Java 家庭记账本

    1 public class FamliyAccount 2 { 3 4 public static void main(String[] args) 5 { 6 // TODO Auto-gener ...

  6. java中StringBuffer与 StringBuilder 类

    目录 创建 StringBuffer 类 追加字符串 替换字符 反转字符串 删除字符串 StringBuffer 方法 在 Java 中,除了通过 String 类创建和处理字符串之外,还可以使用 S ...

  7. forward配置

    Adb connect 127.0.0.1:62001 adb forward tcp:27042 tcp:27042     #设置端口转发 adb forward tcp:27043 tcp:27 ...

  8. Oracle中表字段有使用Oracle关键字的一定要趁早改!!!

    一.问题由来 现在进行项目改造,数据库需要迁移,由原来的使用GBase数据库改为使用Oracle数据库,今天测试人员在测试时后台报了一个异常. 把SQL语句单独复制出来进行查询,还是报错,仔细分析原因 ...

  9. java学习 javaz-001 Helloworld 第一个demo

    java学习 javaz-001 Helloworld 第一个demo 目录 学习目标 前期准备 java sdk 1.8环境 编辑器IDE的选择 代码开发 目录结构 创建第一个java文件 创建第2 ...

  10. coast 海岸 单词记忆方法

    coast 海岸 单词记忆方法 coa 扣 想象一个碗扣下去 st站 碗的边和地面的接触面 就是海岸的边 coast 逼近的地方-海岸 coast (n.) - "margin of the ...