{"id":970,"date":"2014-03-24T15:37:12","date_gmt":"2014-03-24T07:37:12","guid":{"rendered":"http:\/\/hesiwei.cn\/?p=970"},"modified":"2014-03-24T15:37:12","modified_gmt":"2014-03-24T07:37:12","slug":"sublime-text","status":"publish","type":"post","link":"http:\/\/hesiwei.cn\/?p=970","title":{"rendered":"Sublime Text"},"content":{"rendered":"<h2>\u4e0b\u8f7d\u5b89\u88c5<\/h2>\n<p><http: \/\/www.sublimetext.com><\/p>\n<h2>\u63d2\u4ef6<\/h2>\n<ul>\n<li><a href=\"https:\/\/sublime.wbond.net\">Package Control<\/a><\/li>\n<\/ul>\n<p>\u53ef\u901a\u8fc7\u6b64\u63d2\u4ef6\u6765\u5b89\u88c5\u5b89\u88c5\u5176\u4ed6\u63d2\u4ef6<\/p>\n<p>\u5b89\u88c5\u65b9\u6cd5\uff1a\u5feb\u6377\u952ectrl+` \u6216\u8005 View > Show Console \u83dc\u5355\u6253\u5f00\u63a7\u5236\u5668<\/p>\n<p>sublime text 3 \u590d\u5236\u4ee5\u4e0b\u5b89\u88c5<\/p>\n<pre><code>import urllib.request,os,hashlib; h = '7183a2d3e96f11eeadd761d777e62404' + 'e330c659d4bb41d3bdf022e94cab3cd0'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http:\/\/sublime.wbond.net\/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)\n<\/code><\/pre>\n<p>sublime text 2 \u590d\u5236\u4ee5\u4e0b\u5b89\u88c5<\/p>\n<pre><code>import urllib2,os,hashlib; h = '7183a2d3e96f11eeadd761d777e62404' + 'e330c659d4bb41d3bdf022e94cab3cd0'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler()) ); by = urllib2.urlopen( 'http:\/\/sublime.wbond.net\/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); open( os.path.join( ipp, pf), 'wb' ).write(by) if dh == h else None; print('Error validating download (got %s instead of %s), please try manual install' % (dh, h) if dh != h else 'Please restart Sublime Text to finish installation')\n<\/code><\/pre>\n<p>\u5b89\u88c5\u5b8c\u6210\u4e4b\u540e\uff0c\u6211\u4eec\u6441\u4e0b\u201cshift + ctrl + p\u201d\u547c\u51fa\u9762\u677f\uff0c\u8f93\u5165cp\u9009\u547d\u4ee4\u6267\u884c\u5373\u53ef<br \/>\n<!--more--><br \/>\n&#8211; Emmet<\/p>\n<p>Zen Coding \u7684\u5347\u7ea7\u7248\uff0c\u7531 Zen Coding \u7684\u539f\u4f5c\u8005\u8fdb\u884c\u5f00\u53d1\uff0cEmmet \u53ef\u4ee5\u5feb\u901f\u7684\u7f16\u5199 HTML \u548c CSS \u4ee5\u53ca\u5b9e\u73b0\u5176\u4ed6\u7684\u529f\u80fd\u3002\u4f8b\u5b50\uff1a<\/p>\n<p>#page>div.logo+ul#navigation>li*5>a{Item $}<\/p>\n<p>\u5728\u6253\u5f00\u7684 HTML \u6587\u4ef6\u4e2d\u8f93\u5165\u4ee5\u4e0a\uff0c\u6572\u51fb\u4e00\u4e0b TAB \u952e\uff0c\u4f60\u5c31\u4f1a\u53d1\u73b0\u8fd9\u884c\u6307\u4ee4\u53d8\u6210\u4e86\u4e0b\u9762\u7684 HTML \u7ed3\u6784\uff1a<\/p>\n<pre><code>&lt;div id=\"page\"&gt;\n    &lt;div class=\"logo\"&gt;&lt;\/div&gt;\n    &lt;ul id=\"navigation\"&gt;\n        &lt;li&gt;&lt;a href=\"\"&gt;Item 1&lt;\/a&gt;&lt;\/li&gt;\n        &lt;li&gt;&lt;a href=\"\"&gt;Item 2&lt;\/a&gt;&lt;\/li&gt;\n        &lt;li&gt;&lt;a href=\"\"&gt;Item 3&lt;\/a&gt;&lt;\/li&gt;\n        &lt;li&gt;&lt;a href=\"\"&gt;Item 4&lt;\/a&gt;&lt;\/li&gt;\n        &lt;li&gt;&lt;a href=\"\"&gt;Item 5&lt;\/a&gt;&lt;\/li&gt;\n    &lt;\/ul&gt;\n&lt;\/div&gt;\n<\/code><\/pre>\n<p>\u7ecf\u5e38\u7528\u5230 html:xt \u6765\u5feb\u901f\u751f\u6210html\u57fa\u7840\u7ed3\u6784<\/p>\n<pre><code>&lt; !DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd\"&gt;\n&lt;html xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\" xml:lang=\"en\"&gt;\n&lt;head&gt;\n    &lt;meta http-equiv=\"Content-Type\" content=\"text\/html;charset=UTF-8\"\/&gt;\n    &lt;title&gt;Document&lt;\/title&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n\n&lt;\/body&gt;\n&lt;\/html&gt;\n<\/code><\/pre>\n<p>\u4f7f\u7528\u65b9\u6cd5\uff1a<\/http:><http: \/\/docs.emmet.io\/cheat-sheet><\/http:><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0b\u8f7d\u5b89\u88c5 \u63d2\u4ef6 Package Control \u53ef\u901a\u8fc7\u6b64\u63d2\u4ef6\u6765\u5b89\u88c5\u5b89\u88c5\u5176\u4ed6\u63d2\u4ef6 \u5b89\u88c5\u65b9\u6cd5\uff1a\u5feb\u6377\u952ectrl+`  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[],"class_list":["post-970","post","type-post","status-publish","format-standard","hentry","category-22"],"_links":{"self":[{"href":"http:\/\/hesiwei.cn\/index.php?rest_route=\/wp\/v2\/posts\/970","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/hesiwei.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/hesiwei.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/hesiwei.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/hesiwei.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=970"}],"version-history":[{"count":0,"href":"http:\/\/hesiwei.cn\/index.php?rest_route=\/wp\/v2\/posts\/970\/revisions"}],"wp:attachment":[{"href":"http:\/\/hesiwei.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/hesiwei.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=970"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/hesiwei.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}