{"id":20592,"date":"2024-11-19T12:27:47","date_gmt":"2024-11-19T04:27:47","guid":{"rendered":"https:\/\/fwq.ai\/blog\/20592\/"},"modified":"2024-11-19T12:27:47","modified_gmt":"2024-11-19T04:27:47","slug":"sublime%e5%86%99%e5%a5%bd%e4%bb%a3%e7%a0%81%e5%90%8e%e6%80%8e%e4%b9%88%e8%bf%90%e8%a1%8chtml","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/20592\/","title":{"rendered":"sublime\u5199\u597d\u4ee3\u7801\u540e\u600e\u4e48\u8fd0\u884chtml"},"content":{"rendered":"<blockquote><p>\n  \u8fd0\u884c html\uff1a\u5b89\u88c5 html \u9884\u5904\u7406\u5668\uff08\u5982 html-css-js prettify\uff09\u914d\u7f6e\u7528\u6237\u8bbe\u7f6e\uff0c\u5c06\u9884\u5904\u7406\u5668\u6307\u5b9a\u4e3a\u9ed8\u8ba4\uff08&#8221;html_prettify_on_save&#8221;: true\uff09\u4fdd\u5b58 html \u6587\u4ef6 (.html)\u4f7f\u7528\u5feb\u6377\u952e (ctrl + b\/cmd + b) \u6216\u83dc\u5355 (tools &gt; build system &gt; html) \u8fd0\u884c\u548c\u9884\u89c8 html \u6587\u4ef6\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202404\/03\/2024040307181850813.jpg\" class=\"aligncenter\" title=\"sublime\u5199\u597d\u4ee3\u7801\u540e\u600e\u4e48\u8fd0\u884chtml\u63d2\u56fe\" alt=\"sublime\u5199\u597d\u4ee3\u7801\u540e\u600e\u4e48\u8fd0\u884chtml\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u4f7f\u7528 Sublime Text \u8fd0\u884c HTML<\/strong><\/p>\n<p>Sublime Text \u662f\u4e00\u4e2a\u6d41\u884c\u7684\u4ee3\u7801\u7f16\u8f91\u5668\uff0c\u7528\u4e8e\u7f16\u5199\u548c\u7f16\u8f91\u5404\u79cd\u7f16\u7a0b\u8bed\u8a00\uff0c\u5305\u62ec HTML\u3002\u8981\u4f7f\u7528 Sublime Text \u8fd0\u884c HTML\uff0c\u8bf7\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a<\/p>\n<p><strong>\u6b65\u9aa4 1\uff1a\u5b89\u88c5 HTML \u9884\u5904\u7406\u5668<\/strong><\/p>\n<p>Sublime Text \u9ed8\u8ba4\u4e0d\u9644\u5e26\u7528\u4e8e\u8fd0\u884c HTML \u7684 HTML \u9884\u5904\u7406\u5668\u3002\u56e0\u6b64\uff0c\u60a8\u9700\u8981\u5b89\u88c5\u4e00\u4e2a\u3002\u6709\u51e0\u4e2a\u6d41\u884c\u7684\u9009\u62e9\uff0c\u4f8b\u5982\uff1a<\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<ul>\n<li><strong>HTML-CSS-JS Prettify<\/strong><\/li>\n<li><strong>HTML-CSS-JS Formatter<\/strong><\/li>\n<li><strong>Elm Format<\/strong><\/li>\n<\/ul>\n<p>\u524d\u5f80 Package Control \u5e76\u641c\u7d22\u6240\u9700\u7684\u9884\u5904\u7406\u5668\u3002\u6309\u7167\u51fa\u73b0\u7684\u8bf4\u660e\u8fdb\u884c\u5b89\u88c5\u3002<\/p>\n<p><strong>\u6b65\u9aa4 2\uff1a\u914d\u7f6e\u7528\u6237\u8bbe\u7f6e<\/strong><\/p>\n<p>\u5b89\u88c5\u9884\u5904\u7406\u5668\u540e\uff0c\u60a8\u9700\u8981\u914d\u7f6e Sublime Text \u7684\u7528\u6237\u8bbe\u7f6e\u4ee5\u5c06\u5176\u6307\u5b9a\u4e3a\u9ed8\u8ba4\u9884\u5904\u7406\u5668\u3002\u6253\u5f00 Sublime Text \u7684 <strong>Preferences &gt; Settings<\/strong> \u6587\u4ef6\u5e76\u6dfb\u52a0\u4ee5\u4e0b\u884c\uff1a<\/p>\n<pre>\"html_prettify_on_save\": true<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u6b65\u9aa4 3\uff1a\u4fdd\u5b58\u60a8\u7684 HTML \u6587\u4ef6<\/strong><\/p>\n<p>\u7f16\u5199\u60a8\u7684 HTML \u4ee3\u7801\u5e76\u5c06\u5176\u4fdd\u5b58\u4e3a .html \u6587\u4ef6\u3002<\/p>\n<p><strong>\u6b65\u9aa4 4\uff1a\u8fd0\u884c HTML \u6587\u4ef6<\/strong><\/p>\n<p>\u6709\u4e24\u79cd\u65b9\u6cd5\u53ef\u4ee5\u5728 Sublime Text \u4e2d\u8fd0\u884c HTML \u6587\u4ef6\uff1a<\/p>\n<ul>\n<li> <strong>\u4f7f\u7528\u952e\u76d8\u5feb\u6377\u952e\uff1a<\/strong> \u6309 <strong>Ctrl + B<\/strong> (Windows\/Linux) \u6216 <strong>Cmd + B<\/strong> (Mac) \u5c06\u4f7f\u7528\u9884\u5904\u7406\u5668\u8fd0\u884c\u5e76\u9884\u89c8 HTML \u6587\u4ef6\u3002<\/li>\n<li> <strong>\u4f7f\u7528 Sublime Text \u83dc\u5355\uff1a<\/strong> \u8f6c\u5230 <strong>Tools &gt; Build System &gt; HTML<\/strong>\uff0c\u7136\u540e\u9009\u62e9 <strong>Build<\/strong>\u3002\u8fd9\u5c06\u4f7f\u7528\u9884\u5904\u7406\u5668\u8fd0\u884c HTML \u6587\u4ef6\uff0c\u5e76\u5728 Sublime Text \u4e2d\u663e\u793a\u751f\u6210\u7684 HTML \u6587\u4ef6\u3002<\/li>\n<\/ul>\n<p><strong>\u6ce8\u610f\uff1a<\/strong>\u8981\u67e5\u770b HTML \u6587\u4ef6\u5728\u6d4f\u89c8\u5668\u4e2d\u7684\u5916\u89c2\uff0c\u60a8\u9700\u8981\u5c06\u6587\u4ef6\u62d6\u653e\u5230\u6d4f\u89c8\u5668\u7a97\u53e3\u4e2d\uff0c\u6216\u5728\u6d4f\u89c8\u5668\u5730\u5740\u680f\u4e2d\u624b\u52a8\u8f93\u5165\u6587\u4ef6\u8def\u5f84\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5199\u597d\u4ee3\u7801\u540e\u600e\u4e48\u8fd0\u884chtml\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd0\u884c html\uff1a\u5b89\u88c5 html \u9884\u5904\u7406\u5668\uff08\u5982 html-css-js prettify\uff09\u914d\u7f6e\u7528\u6237\u8bbe\u7f6e\uff0c\u5c06\u9884\u5904\u7406\u5668\u6307\u5b9a\u4e3a\u9ed8\u8ba4\uff08&#8221;html_prettify_on_save&#8221;: true\uff09\u4fdd\u5b58 html \u6587\u4ef6 (.html)\u4f7f\u7528\u5feb\u6377\u952e (ctrl + b\/cmd + b) \u6216\u83dc\u5355 (tools &gt; build system &gt; html) \u8fd0\u884c\u548c\u9884\u89c8 html \u6587\u4ef6\u3002 \u5982\u4f55\u4f7f\u7528 Sublime Text \u8fd0\u884c HTML Sublime Text \u662f\u4e00\u4e2a\u6d41\u884c\u7684\u4ee3\u7801\u7f16\u8f91\u5668\uff0c\u7528\u4e8e\u7f16\u5199\u548c\u7f16\u8f91\u5404\u79cd\u7f16\u7a0b\u8bed\u8a00\uff0c\u5305\u62ec HTML\u3002\u8981\u4f7f\u7528 Sublime Text \u8fd0\u884c HTML\uff0c\u8bf7\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a \u6b65\u9aa4 1\uff1a\u5b89\u88c5 HTML \u9884\u5904\u7406\u5668 Sublime Text \u9ed8\u8ba4\u4e0d\u9644\u5e26\u7528\u4e8e\u8fd0\u884c HTML \u7684 HTML \u9884\u5904\u7406\u5668\u3002\u56e0\u6b64\uff0c\u60a8\u9700\u8981\u5b89\u88c5\u4e00\u4e2a\u3002\u6709\u51e0\u4e2a\u6d41\u884c\u7684\u9009\u62e9\uff0c\u4f8b\u5982\uff1a \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b HTML-CSS-JS Prettify HTML-CSS-JS Formatter Elm [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-20592","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20592","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=20592"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20592\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=20592"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=20592"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=20592"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}