Sublime Text 2 Emmet Plugin usage profile

Source: Internet
Author: User


Sublime Text 2 Emmet Plugin usage profile


Sublime text can be said to be the best use of a text editor, especially for the vast number of farm friends, especially the front-end code farm friends. I won't say much about the benefits of sublime test, I'll download it myself. Believe that will use sublime text user also must install its Package manager, then I am here today to focus onEmmetthis plugin.


1. Quickly create HTML documents

<!-html: 5 + `tab` or`! `+` tab`->
<! DOCTYPE html>
<html lang = "en">
<head>
    <meta charset = "UTF-8">
    <title> Document </ title>
</ head>
<body>

</ body>
</ html>

<!-html: xs + `tab`->
<! DOCTYPE html PUBLIC "-// W3C // DTD XHTML 1.0 Strict // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml" xml: lang = "en">
<head>
    <meta http-equiv = "Content-Type" content = "text / html; charset = UTF-8">
    <title> Document </ title>
</ head>
<body>

</ body>
</ html>

<!-html: xt + `tab`->
<! DOCTYPE html PUBLIC "-// W3C // DTD XHTML 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml" xml: lang = "en">
<head>
    <meta http-equiv = "Content-Type" content = "text / html; charset = UTF-8">
    <title> Document </ title>
</ head>
<body>

</ body>
</ html>
2. Grammar 2.1. Descendants:>
<!-div> p + `tab`->
<div>
    <p> </ p>
</ div>
2.2. Brother: +
<!-div + div + `tab`->
<div> </ div>
<div> </ div>
2.3. Superior: ^
<!-div> ul> li * 5 ^ p + `tab`->
<div>
    <ul>
        <li> </ li>
        <li> </ li>
        <li> </ li>
        <li> </ li>
        <li> </ li>
    </ ul>
    <p> </ p>
</ div>
2.4. Grouping: ()
<!-div> (header> ul> li * 2> a) + footer> p + `tab`->
<div>
    <header>
        <ul>
            <li> <a href=""> </a> </ li>
            <li> <a href=""> </a> </ li>
        </ ul>
    </ header>
    <footer>
        <p> </ p>
    </ footer>
</ div>
2.5. Multiplication: *
<!-ul> li * 5 + `tab`->
<ul>
    <li> </ li>
    <li> </ li>
    <li> </ li>
    <li> </ li>
    <li> </ li>
</ ul>
2.6. Self-increasing symbol: $
<!-ul> li.item $ * 5 + `tab`->
<ul>
    <li class = "item1"> </ li>
    <li class = "item2"> </ li>
    <li class = "item3"> </ li>
    <li class = "item4"> </ li>
    <li class = "item5"> </ li>
</ ul>

<!-ul> li.item $$$ * 5 + `tab`->
<ul>
    <li class = "item001"> </ li>
    <li class = "item002"> </ li>
    <li class = "item003"> </ li>
    <li class = "item004"> </ li>
    <li class = "item005"> </ li>
</ ul>

<!-ul> [email protected] * 5 + `tab`->
<ul>
    <li class = "item5"> </ li>
    <li class = "item4"> </ li>
    <li class = "item3"> </ li>
    <li class = "item2"> </ li>
    <li class = "item1"> </ li>
</ ul>

<!-ul> [email protected] * 5 + `tab`->
<ul>
    <li class = "item3"> </ li>
    <li class = "item4"> </ li>
    <li class = "item5"> </ li>
    <li class = "item6"> </ li>
    <li class = "item7"> </ li>
</ ul>
2.7. ID and class attributes
<!-#header + `tab`->
<div id = "header"> </ div>

<!-p # header + `tab`->
<p id = "header"> </ p>

<!-.title + `tab`->
<div class = "title"> </ div>

<!-p.title + `tab`->
<p class = "title"> </ p>
2.8. Custom properties
<!-p [title = "Hello world"] + `tab`->
<p title = "Hello world"> </ p>
2.9. Text
<!-a {Click me} + `tab`->
<a href=""> Click me </a>

<!-p> {Click} + a {here} + {to continue} + `tab`->
<p> Click <a href=""> here </a> to continue </ p>
3. Commonly used abbreviations of HTML and CSS 3.1. Meta
<!-meta: utf->
<meta http-equiv = "Content-Type" content = "text / html; charset = UTF-8">

<!-meta: vp->
<meta name = "viewport" content = "width = device-width, user-scalable = no, initial-scale = 1.0, maximum-scale = 1.0, minimum-scale = 1.0">

<!-meta: compat->
<meta http-equiv = "X-UA-Compatible" content = "IE = 7">
3.2. Table
<!-table +->
<table>
    <tr>
        <td> </ td>
    </ tr>
</ table>
3.3. Css
/ * bd + * /
.test {
    border: 1px solid # 000;
}
References
Emmet cheat sheet
Emmet official website
Introduction to Sublime Text 2's Emmet plugin

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.