Summary:
Installation Please read the previous article Sublime Text-Installation, use it with sublime’s own shortcut keys, and write HTML quickly.
The following are commonly used. For complete information, please see the emmet official documentation.
Generate tags
1. Quickly generate document structure
##!
or
html:5, Quickly generate
HTML5 structure (you need to press the tab key again)
nbsp;html> <meta> <title>Document</title>
html:xt
Generate HTML4 transitional type
html:4s
Generate HTML4 strict type
p#header
<p></p>3. Generate elements with
class
tag. Class name, such as:p.title
<p></p>4. Generate descendant elements:> Such as:
nav>ul>li
<nav> <ul> <li> </ul> </nav>5 .Generate sibling elements: + such as:
p+p+p
<p></p> <p></p> <p></p>6. Generate superior elements: ^such as:
p^p
<p></p> <p></p>7. Repeatedly generate multiple elements: *
Such as:
ul>li*5
-
-
-
-
-
8. Generate from DefinitionAttribute: [attr]
For example:p[value=1]
<p></p>9. Generate text content: {}For example:
a{Click me}
<a>Click me</a>10. Add number: $
- Start from 1: add $
p.item${$$}*3
<p>01</p> <p>02</p> <p>03</p>
- Reverse order: $ followed by @-
p.item$@-{$$@-}*3
<p>03</p> <p>02</p> <p>01</p>
- Specify the serial number: you can use @N
p.item$@4{$$@4}*3
<p>04</p> <p>05</p> <p>06</p>11.
Group: ()
For example:(ul>ol)*3
comprehensive case
table#tab[value=1].a>tr*3>(td{$$}>span)*3
01 | 02 | 03 |
01 | 02 | 03 |
01 | 02 | 03 |
- w10
width<a href="http://www.php.cn/wiki/835.html" target="_blank">: 10px;</a> w10p
width: 10%;w10e
width: 10em;w10x
width: 10xe; - h10
height<a href="http://www.php.cn/wiki/836.html" target="_blank">: 10px;</a>
- por
position<a href="http://www.php.cn/wiki/902.html" target="_blank">: relative;</a> poa
position: absolute; - fll
float<a href="http://www.php.cn/wiki/919.html" target="_blank">: left;</a> fr
float:right<a href="http://www.php.cn/wiki/905.html" target="_blank">;</a>
- dt
display<a href="http://www.php.cn/wiki/927.html" target="_blank">: table;</a> db
display: block;dib
display: inline-block; ##ovy overflow-y
: hidden;<a href="http://www.php.cn/wiki/926.html" target="_blank"></a>
cb -
clear
##mt: both;<a href="http://www.php.cn/wiki/917.html" target="_blank"></a>
- margin-top
: ;
mb <a href="http://www.php.cn/wiki/933.html" target="_blank"></a>margin-bottom
: ;<a href="http://www.php.cn/wiki/935.html" target="_blank"></a>
pt
<a href="http://www.php.cn/wiki/949.html" target="_blank">padding-top</a>: ;
pb<a href="http://www.php.cn/wiki/951.html" target="_blank">padding-bottom</a>: ;
tac
<a href="http://www.php.cn/wiki/870.html" target="_blank">text-align</a>: center;
lh
<a href="http://www.php.cn/wiki/864.html" target="_blank">line-height</a>:;
tsn
<a href="http://www.php.cn/wiki/861.html" target="_blank">text-shadow</a>: none;
tja
<a href="http://www.php.cn/wiki/881.html" target="_blank">text-justify</a>: auto;
c
color: #000;
crcolor: rgb(0, 0, 0);
cracolor: rgba(0, 0, 0, .5);
op
opacity: ;
cnt
content: '';
ol
<a href="http://www.php.cn/wiki/938.html" target="_blank">outline</a>: ;
bd+
border: 1px solid #000;
bdb+border-bottom: 1px solid #000;
bd2px#333s
border: 2px #333 solid;
快捷键
如果没作用请检查快捷键是否冲突
快速生成包裹标签:Ctrl+Shift+G
只有文本没有结构时,如下
首页 简介 动态
选中文本按快捷键Ctrl+Shift+G,再弹出的:Enter Wrap Abbreviation(输入扩展缩写)中输入nav>ul>li.item$*>a
就会生成
<nav> <ul> <li><a>首页</a></li> <li><a>简介</a></li> <li><a>动态</a></li> </ul> </nav>
如果原先的文本带编号,不想要则可以在上面的基础上加|t
,nav>ul>li.item$*>a|t
即可生成如上结果。
1首页 2简介 3动态
自动添加/更新图片尺寸:ctrl+U
光标移到标签上的任意位置,按下快捷键ctrl+U
即可。
<img src="/static/imghwm/default1.png" data-src="img/x1.png" class="lazy" alt="Detailed explanation of the use of Sublime Text plug-in Emmet" > <img src="/static/imghwm/default1.png" data-src="img/x1.png" class="lazy" alt="Detailed explanation of the use of Sublime Text plug-in Emmet" >
删除标签:shift+ctrl+;
定位到上个编辑点:ctrl+alt+left
定位到下个编辑点:ctrl+alt+right
选中下一项:shift+ctrl+.
加/减1:ctrl+up/ctrl+down
加/减10:shift+alt+up/shift+alt+down
展开缩写:ctrl+e(和tab键作用相同)
重命名标签(rename_tag):ctrl+shift+'
更换标签(update_as_you_type):ctrl+Shift+U
匹配标签对:ctrl+alt+j
生成测试文本
输入lorem
再按tab会随机生成一段英文,默认是生成30个单词,可以加上数字控制单词数量,如lorem5
。
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perferendis incidunt, expedita voluptates ratione praesentium error a accusamus corporis deleniti. Cum, debitis id, in rem exercitationem at voluptatum illum minima corporis!
Lorem ipsum dolor sit amet.
The above is the detailed content of Detailed explanation of the use of Sublime Text plug-in Emmet. For more information, please follow other related articles on the PHP Chinese website!

Sublime Text 替换功能允许用户搜索和替换文本。该功能可通过 "查找" 菜单中的 "替换" 选项启用。使用此功能的步骤包括:输入要搜索的文本、输入替换文本、选择是否启用正则表达式、选择替换所有或选择性替换。高级选项包括匹配大小写、匹配整个单词和使用选区。

Sublime Text 中可通过以下三种方法显示运行结果:使用控制台窗口:打开控制台窗口并使用 print 语句打印结果。使用快速面板:打开快速面板,选择终端选项卡并运行代码。使用第三方插件:安装 SublimeREPL 或 Console 2 等插件,运行代码后结果将在专属窗口中显示。

是,Sublime Text可以通过以下步骤执行代码:为特定编程语言安装插件配置构建系统创建构建文件使用键盘快捷键(Mac:Command + B;Windows/Linux:Control + B)执行代码

在 Sublime Text 中编写 Python 代码,请按照以下步骤操作:安装 Sublime Text。创建新项目并保存文件为 .py。通过快捷键 Ctrl + B (Windows) / Cmd + B (Mac) 运行 Python 代码。此外,还可以通过安装 Python 插件、设置 Python 解释器、启用自动缩进和语法高亮等方式增强 Python 代码编写体验。

可以通过以下步骤修改 phpStudy 配置文件:找到配置文件(Windows:C:\Windows\phpStudy\php\php.ini;Mac:/Applications/phpStudy/php/php.ini)使用文本编辑器打开并查找要修改的设置编辑设置的值,如修改时区:date.timezone = Asia/Shanghai保存更改并重启 Apache 服务

在 Sublime 中运行代码的方法包括:使用快捷键 (Ctrl + B)通过菜单 (工具 > 构建 > 运行)使用命令面板 (Ctrl + Shift + P > 输入“运行”)使用构建系统 (工具 > 构建系统 > 选择一个构建系统)设置默认构建系统 (首选项 > 设置 - 用户 > 添加“build_system”键值)

在 Sublime Text 中安装 Pygame 的步骤:确保已安装 Python 3。使用 pip 安装 pip。使用 pip 安装 Pygame。将 Pygame 路径添加到环境变量。验证安装是否成功。

Flask和SublimeText集成:Pythonweb应用程序开发技巧(第六部分)SublimeText和Flask都是Pythonweb应用程序开发中的重要工具。然而,如何将二者集成起来,使得开发过程更加高效呢?本文将介绍一些SublimeText的插件和配置技巧,帮助你更方便地开发Flask应用程序。一、安装SublimeText插件F


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Dreamweaver Mac version
Visual web development tools

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft
