Home > Article > Development Tools > How to install emmet in sublime
How to install Emmet in Sublime
Emmet is a powerful code snippet extension that can greatly improve the efficiency of writing HTML and CSS in Sublime Text. Here's how to install Emmet:
Installing Package Control
Package Control is the package manager for Sublime Text. If you haven't installed it yet, follow these steps:
Ctrl Shift P
(Windows/Linux) or Cmd Shift P
(Mac) Open the command palette.
<li>Enter Install
and select Package Control: Install Package
.
<li>In the pop-up search box, enter Package Control
and press Enter.
Install Emmet
After installing Package Control, you can install Emmet:
Install
and select Package Control: Install Package
.
<li>In the search box, enter Emmet
and press Enter.
Emmet will be installed automatically.
Configuring Emmet
After installing Emmet, you need to configure some settings to enable it:
Preferences
> Settings - User
.
<li>Add or update the following settings:
<code>"emmet_syntax_profiles": { "html": "html", "css": "css" }</code>
Using Emmet
Now that Emmet is installed and configured, you can use it to generate code snippets. Here are a few examples:
<ul> <li> Generate<div>
elements: Enter div
and press Tab
.
<li>
Generate <div>
elements containing inline elements: Enter div>p
and press Tab
.
<li>
Generate <li>
elements with multiple classes: Enter li.item1.item2
, press Tab
.
<li>
Generate nested <ul>
and <li>
lists: Enter ul>li${5}
, press Tab
.
For more details and usage examples of Emmet, please see its documentation: https://docs.emmet.io/
The above is the detailed content of How to install emmet in sublime. For more information, please follow other related articles on the PHP Chinese website!