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. 使用 CMake 编写 Windows 静态库

    最近有一个多个 .h .cc .cpp 编译成静态库的需求,故记录下过程 静态库不同于动态库,它不需要 main 入口,只要各个源文件与头文件能对应,也就是源文件和头文件引用的头文件能够找到函数的符号 ...

  2. Ansible的基本配置

    目录 定义主机和组 主机的定义 主机组的定于 主机组的嵌套 选择主机和组 匹配主机 使用通配符匹配 配置文件优先级 配置文件详解 配置文件段 配置文件参数说明 配置案例 1. 在节点上创建一个普通用户 ...

  3. MYSQL查询数据表中某个字段包含某个数值

    当某个字段中字符串是"1,2,3,4,5,6"或者"123456"查询数据表中某个字段是否包含某个值1:模糊查询  使用like       select * ...

  4. RK3568开发笔记(八):开发板烧写buildroot固件(支持hdmi屏),搭建Qt交叉编译开发环境,编译一个Demo,目标板运行Demo测试

    前言   前面发现开发板用ubuntu固件发现空间不够,本篇使用buildroot固件,来实现目标板运行qt界面应用.   烧写buildroot固件   这部分更详细的参照<RK3568开发笔 ...

  5. linux下virtualenvwrapper安装

    安装 pip3 install virtualenvwrapper -i https://pypi.douban.com/simple 设置linux的用户配置文件配置virtualenvwrappe ...

  6. 在矩池云使用Llama2-7B的方法

    今天给大家分享如何在矩池云服务器使用 Llama2-7b模型. 硬件要求 矩池云已经配置好了 Llama 2 Web UI 环境,显存需要大于 8G,可以选择 A4000.P100.3090 以及更高 ...

  7. 名校 AI 课程|斯坦福 CS25:Transformers United 专题讲座

    自 2017 年提出后,Transformer 名声大噪,不仅颠覆了自然语言处理(NLP)领域,而且在计算机视觉(CV).强化学习(RL).生成对抗网络(GANs).语音甚至是生物学等领域也大显锋芒, ...

  8. nginx 基本功能

    1.nginx简介 官方文档 Nginx是一个高性能WEB服务器,除它之外Apache.Tomcat.Jetty.IIS,它们都是Web服务器,或者叫做WWW(World Wide Web)服务器,相 ...

  9. WebView无法加载页面报错 net:ERR_CLEARTEXT_NOT_PERMITTED 还有webView加载网页后出现ERR_UNKNOWN_URL_SCHEME

    根据网络安全配置- 从Android 9(API级别28)开始,默认情况下禁用明文支持.因此http的url均无法在webview中加载 还可以看看-https: //koz.io/android-m ...

  10. 聚焦企业流程智能化发展新趋势,中国信通院2022 RPA创新产业峰会即将开启

    机器人流程自动化(Robotic Process Automation,RPA)是数字时代的重要劳动力之一,流程的自动化.智能化运行是企业释放运营能效.提升客户服务水平的重要路径. 近年来,各行业对R ...