Sublime Text2 建立檔案快速產生Html頭部資訊和炫酷的代碼補全

來源:互聯網
上載者:User

標籤:ctr   doc   nal   sheet   command   sse   plugin   pac   meta   

預備:安裝emmet外掛程式(previously known as  Zen Coding)方法一  package control法:

        上一篇部落格已經介紹了如何安裝package control。開啟sublime,mac下用command + shift + p調出命令視窗,輸入install,選中package control:install package,等待1-2秒,下拉選中emmet plugin斷行符號,等待2-3秒,重啟sublime。

方法二 手動安裝法:

  git下emmet plugin,開啟sublime,preferences,browse packages,將下載的zip檔案解壓放到packages檔案夾下,重啟sublime。

  參見:官方安裝文檔  用命令 command + F 尋找 install即可。

 

刪除已安裝外掛程式:按ctr+shift +p然後輸入remove 斷行符號,再輸入要刪除的外掛程式名。

開始體驗:輸入以下簡寫,按tab鍵

html:5 

 1 <!doctype html> 2 <html lang="en"> 3 <head> 4     <meta charset="UTF-8"> 5     <title>Document</title> 6 </head> 7 <body> 8      9 </body>10 </html>

html:4t

 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2 <html lang="en"> 3 <head> 4     <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> 5     <title>Document</title> 6 </head> 7 <body> 8      9 </body>10 </html>

html:4s

 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 2 <html lang="en"> 3 <head> 4     <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> 5     <title>Document</title> 6 </head> 7 <body> 8      9 </body>10 </html>

html:xxs

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> 3 <head> 4     <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> 5     <title>Document</title> 6 </head> 7 <body> 8      9 </body>10 </html>

ul#nav>li.itemS*4>a{Item $}

1  <ul id="nav">2        <li class="itemS"><a href="">Item 1</a></li>3        <li class="itemS"><a href="">Item 2</a></li>4        <li class="itemS"><a href="">Item 3</a></li>5        <li class="itemS"><a href="">Item 4</a></li>6  </ul>

更多炫酷資訊和emmet文法請參見:

    • 視頻demo
    • 文法文檔
    • 一些必不可少的Sublime Text 2外掛程式
  • 連結:http://www.cnblogs.com/freeyiyi1993/p/3629905.html

Sublime Text2 建立檔案快速產生Html頭部資訊和炫酷的代碼補全

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.