{"id":20591,"date":"2024-11-19T14:17:25","date_gmt":"2024-11-19T06:17:25","guid":{"rendered":"https:\/\/fwq.ai\/blog\/20591\/"},"modified":"2024-11-19T14:17:25","modified_gmt":"2024-11-19T06:17:25","slug":"sublime%e6%80%8e%e4%b9%88%e6%89%a7%e8%a1%8c","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/20591\/","title":{"rendered":"sublime\u600e\u4e48\u6267\u884c"},"content":{"rendered":"<blockquote><p>\n  \u662f\uff0csublime text\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u6b65\u9aa4\u6267\u884c\u4ee3\u7801\uff1a\u4e3a\u7279\u5b9a\u7f16\u7a0b\u8bed\u8a00\u5b89\u88c5\u63d2\u4ef6\u914d\u7f6e\u6784\u5efa\u7cfb\u7edf\u521b\u5efa\u6784\u5efa\u6587\u4ef6\u4f7f\u7528\u952e\u76d8\u5feb\u6377\u952e\uff08mac\uff1acommand + b\uff1bwindows\/linux\uff1acontrol + b\uff09\u6267\u884c\u4ee3\u7801\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202404\/03\/2024040307151862161.jpg\" class=\"aligncenter\" title=\"sublime\u600e\u4e48\u6267\u884c\u63d2\u56fe\" alt=\"sublime\u600e\u4e48\u6267\u884c\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u4f7f\u7528 Sublime \u6267\u884c\u4ee3\u7801<\/strong><\/p>\n<p>Sublime Text \u662f\u4e00\u4e2a\u6d41\u884c\u7684\u4ee3\u7801\u7f16\u8f91\u5668\uff0c\u5b83\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u529f\u80fd\uff0c\u5305\u62ec\u4ee3\u7801\u6267\u884c\u3002\u672c\u6587\u5c06\u6307\u5bfc\u4f60\u5982\u4f55\u4f7f\u7528 Sublime \u6267\u884c\u4ee3\u7801\u3002<\/p>\n<p><strong>\u6b65\u9aa4 1\uff1a\u5b89\u88c5\u8bed\u8a00\u7279\u5b9a\u63d2\u4ef6<\/strong><\/p>\n<p>\u4e3a\u4e86\u6267\u884c\u4ee3\u7801\uff0c\u4f60\u9700\u8981\u5b89\u88c5\u9488\u5bf9\u7279\u5b9a\u7f16\u7a0b\u8bed\u8a00\u7684\u63d2\u4ef6\u3002\u4f8b\u5982\uff0c\u8981\u6267\u884c Python \u4ee3\u7801\uff0c\u4f60\u9700\u8981\u5b89\u88c5 Python \u63d2\u4ef6\u3002\u8f6c\u5230 Sublime Text \u7684\u201cPackage Control\u201d\u83dc\u5355\uff0c\u641c\u7d22\u76f8\u5173\u63d2\u4ef6\uff0c\u7136\u540e\u5355\u51fb\u201cInstall\u201d\u3002<\/p>\n<p><strong>\u6b65\u9aa4 2\uff1a\u914d\u7f6e\u6784\u5efa\u7cfb\u7edf<\/strong><\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u4f60\u9700\u8981\u914d\u7f6e\u5fc5\u8981\u7684\u6784\u5efa\u7cfb\u7edf\u3002\u6784\u5efa\u7cfb\u7edf\u662f\u4e00\u7ec4\u547d\u4ee4\uff0c\u7528\u4e8e\u7f16\u8bd1\u3001\u6784\u5efa\u548c\u8fd0\u884c\u4ee3\u7801\u3002\u5bf9\u4e8e Python\uff0c\u8f6c\u5230\u201cTools\u201d &gt; \u201cBuild System\u201d &gt; \u201cPython\u201d\u3002<\/p>\n<p><strong>\u6b65\u9aa4 3\uff1a\u521b\u5efa\u6784\u5efa\u6587\u4ef6<\/strong><\/p>\n<p>\u73b0\u5728\uff0c\u4f60\u9700\u8981\u521b\u5efa\u4e00\u4e2a\u6784\u5efa\u6587\u4ef6\uff0c\u7528\u4e8e\u6307\u5b9a\u8981\u6267\u884c\u7684\u4ee3\u7801\u548c\u6784\u5efa\u7cfb\u7edf\u3002\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a &#8220;build.-build&#8221; \u7684\u6587\u4ef6\uff0c\u5e76\u7c98\u8d34\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n<pre>{\n  \"cmd\": [\"python\", \"$file\"],\n  \"selector\": \"source.python\"\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8fd9\u5c06\u4f7f\u7528 Python \u89e3\u91ca\u5668\u8fd0\u884c\u5f53\u524d\u6587\u4ef6\u3002<\/p>\n<p><strong>\u6b65\u9aa4 4\uff1a\u6267\u884c\u4ee3\u7801<\/strong><\/p>\n<p>\u8981\u6267\u884c\u4ee3\u7801\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u952e\u76d8\u5feb\u6377\u952e\uff1a<\/p>\n<ul>\n<li> <strong>Mac\uff1a<\/strong> Command + B<\/li>\n<li> <strong>Windows\/Linux\uff1a<\/strong> Control + B<\/li>\n<\/ul>\n<p>Sublime Text \u5c06\u4f7f\u7528\u914d\u7f6e\u7684\u6784\u5efa\u7cfb\u7edf\u6267\u884c\u4ee3\u7801\u3002<\/p>\n<p><strong>\u989d\u5916\u63d0\u793a<\/strong><\/p>\n<ul>\n<li>\u5982\u679c\u4f60\u60f3\u5728\u5916\u90e8\u63a7\u5236\u53f0\u4e2d\u6267\u884c\u4ee3\u7801\uff0c\u8bf7\u5728\u6784\u5efa\u6587\u4ef6\u4e2d\u4f7f\u7528 &#8220;console&#8221;: true&#8221;\u3002<\/li>\n<li>\u4f60\u53ef\u4ee5\u4f7f\u7528 Sublime Text \u63d2\u4ef6\uff0c\u4f8b\u5982 &#8220;Terminus&#8221;\uff0c\u6765\u7ba1\u7406\u548c\u4ea4\u4e92\u5916\u90e8\u63a7\u5236\u53f0\u3002<\/li>\n<li>\u5bf9\u4e8e\u5176\u4ed6\u7f16\u7a0b\u8bed\u8a00\uff0c\u8bf7\u6309\u7167\u76f8\u4f3c\u7684\u6b65\u9aa4\u64cd\u4f5c\uff0c\u5b89\u88c5\u76f8\u5e94\u7684\u63d2\u4ef6\u548c\u914d\u7f6e\u6784\u5efa\u7cfb\u7edf\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u6267\u884c\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>\u662f\uff0csublime text\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u6b65\u9aa4\u6267\u884c\u4ee3\u7801\uff1a\u4e3a\u7279\u5b9a\u7f16\u7a0b\u8bed\u8a00\u5b89\u88c5\u63d2\u4ef6\u914d\u7f6e\u6784\u5efa\u7cfb\u7edf\u521b\u5efa\u6784\u5efa\u6587\u4ef6\u4f7f\u7528\u952e\u76d8\u5feb\u6377\u952e\uff08mac\uff1acommand + b\uff1bwindows\/linux\uff1acontrol + b\uff09\u6267\u884c\u4ee3\u7801 \u5982\u4f55\u4f7f\u7528 Sublime \u6267\u884c\u4ee3\u7801 Sublime Text \u662f\u4e00\u4e2a\u6d41\u884c\u7684\u4ee3\u7801\u7f16\u8f91\u5668\uff0c\u5b83\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u529f\u80fd\uff0c\u5305\u62ec\u4ee3\u7801\u6267\u884c\u3002\u672c\u6587\u5c06\u6307\u5bfc\u4f60\u5982\u4f55\u4f7f\u7528 Sublime \u6267\u884c\u4ee3\u7801\u3002 \u6b65\u9aa4 1\uff1a\u5b89\u88c5\u8bed\u8a00\u7279\u5b9a\u63d2\u4ef6 \u4e3a\u4e86\u6267\u884c\u4ee3\u7801\uff0c\u4f60\u9700\u8981\u5b89\u88c5\u9488\u5bf9\u7279\u5b9a\u7f16\u7a0b\u8bed\u8a00\u7684\u63d2\u4ef6\u3002\u4f8b\u5982\uff0c\u8981\u6267\u884c Python \u4ee3\u7801\uff0c\u4f60\u9700\u8981\u5b89\u88c5 Python \u63d2\u4ef6\u3002\u8f6c\u5230 Sublime Text \u7684\u201cPackage Control\u201d\u83dc\u5355\uff0c\u641c\u7d22\u76f8\u5173\u63d2\u4ef6\uff0c\u7136\u540e\u5355\u51fb\u201cInstall\u201d\u3002 \u6b65\u9aa4 2\uff1a\u914d\u7f6e\u6784\u5efa\u7cfb\u7edf \u63a5\u4e0b\u6765\uff0c\u4f60\u9700\u8981\u914d\u7f6e\u5fc5\u8981\u7684\u6784\u5efa\u7cfb\u7edf\u3002\u6784\u5efa\u7cfb\u7edf\u662f\u4e00\u7ec4\u547d\u4ee4\uff0c\u7528\u4e8e\u7f16\u8bd1\u3001\u6784\u5efa\u548c\u8fd0\u884c\u4ee3\u7801\u3002\u5bf9\u4e8e Python\uff0c\u8f6c\u5230\u201cTools\u201d &gt; \u201cBuild System\u201d &gt; \u201cPython\u201d\u3002 \u6b65\u9aa4 3\uff1a\u521b\u5efa\u6784\u5efa\u6587\u4ef6 \u73b0\u5728\uff0c\u4f60\u9700\u8981\u521b\u5efa\u4e00\u4e2a\u6784\u5efa\u6587\u4ef6\uff0c\u7528\u4e8e\u6307\u5b9a\u8981\u6267\u884c\u7684\u4ee3\u7801\u548c\u6784\u5efa\u7cfb\u7edf\u3002\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a &#8220;build.-build&#8221; \u7684\u6587\u4ef6\uff0c\u5e76\u7c98\u8d34\u4ee5\u4e0b\u5185\u5bb9\uff1a { &#8220;cmd&#8221;: [&#8220;python&#8221;, &#8220;$file&#8221;], &#8220;selector&#8221;: &#8220;source.python&#8221; } \u767b\u5f55\u540e\u590d\u5236 \u8fd9\u5c06\u4f7f\u7528 Python \u89e3\u91ca\u5668\u8fd0\u884c\u5f53\u524d\u6587\u4ef6\u3002 \u6b65\u9aa4 4\uff1a\u6267\u884c\u4ee3\u7801 \u8981\u6267\u884c\u4ee3\u7801\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u952e\u76d8\u5feb\u6377\u952e\uff1a Mac\uff1a Command [&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-20591","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20591","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=20591"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20591\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=20591"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=20591"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=20591"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}