{"id":114,"date":"2023-03-31T19:41:00","date_gmt":"2023-03-31T11:41:00","guid":{"rendered":"https:\/\/solost.cn\/?p=114"},"modified":"2023-03-31T20:31:14","modified_gmt":"2023-03-31T12:31:14","slug":"217","status":"publish","type":"post","link":"https:\/\/solost.cn\/?p=114","title":{"rendered":"sublime text C++\u8be6\u7ec6\u914d\u7f6e\u6559\u7a0b"},"content":{"rendered":"<h2>1. \u5b89\u88c5sublime text<\/h2>\n<p>\u8fdb\u5165<a href=\"https:\/\/www.sublimetext.com\/\">sublime\u5b98\u7f51<\/a>\u4e0b\u8f7dsublime\u7684\u5b89\u88c5\u5305\uff08\u5f53\u7136\u4e5f\u53ef\u4ee5\u5728<a href=\"https:\/\/www.sublimetext.com\/download\">\u5b98\u7f51\u4e0b\u8f7d\u9875\u9762<\/a>\u4e0b\u8f7dportable\u7248\u672c\uff0c\u4e0d\u8fc7<strong>\u5efa\u8bae\u4e0b\u8f7d\u9ed8\u8ba4\u7684setup\u7248\u672c<\/strong>\uff09<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-b90aeb68f64eba9d1aa646a77141d4a3_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-419b28186888348a44ae2e7f3ee75c17_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u53cc\u51fb\u5b89\u88c5\u5305\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-340bb9290af652bed1e29960538f25ce_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u5e94\u8be5\u4e00\u4f1a\u5c31\u4e0b\u8f7d\u5b8c\u6210\u4e86\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-2d2b381e723ac8c60188ba0292775482_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u6b64\u65f6\u53ef\u4ee5\u5728\u5e94\u7528\u5217\u8868\u770b\u5230sublime\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-049fc209082afc3aa34380a662afa8c4_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-12dda26a8d443197a8e04be31bc1f7c6_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<h2>2. \u4e0b\u8f7dLLVM\u548cClang<\/h2>\n<blockquote><p>\u53c2\u8003 <a href=\"https:\/\/www.cnblogs.com\/FrankOu\/p\/14215850.html\">https:\/\/www.cnblogs.com\/FrankOu\/p\/14215850.html<\/a><\/p><\/blockquote>\n<p>\u73b0\u5728\u4f7f\u7528Clang\u7f16\u8bd1\u662f\u5927\u8d8b\u52bf\uff0c\u6240\u4ee5\u6211\u4eec\u8fd9\u91cc\u5c31\u4e0d\u4f7f\u7528gcc\u4e86\uff08\u867d\u7136\u5728\u4e0b\u8f7dClang\u7684\u8fc7\u7a0b\u4e2d\u4e5f\u4f1a\u5b89\u88c5gcc\uff09<\/p>\n<p>Windows\u4e0b\u76f4\u63a5\u5b89\u88c5LLVM\u4f1a\u51fa\u73b0C++\u6807\u51c6\u5e93\u4e22\u5931\u7684\u95ee\u9898\uff0c\u6240\u4ee5\u6211\u4eec\u9700\u8981\u7528\u5230MSYS2\u8fd9\u4e2a\u5b89\u88c5\u5de5\u5177\uff0c\u539f\u7406\u5c31\u662f\u76f4\u63a5\u5b89\u88c5\u522b\u4eba\u7f16\u8bd1\u597d\u7684Clang\uff0c\u5f88\u65b9\u4fbf\u3002<\/p>\n<h3>2.1 \u4e0b\u8f7dmsys2\u5e76\u914d\u7f6e<\/h3>\n<h3>2.1.1 msys2\u7684\u4e0b\u8f7d<\/h3>\n<p>\u5728<a href=\"https:\/\/www.msys2.org\/\">MSYS\u5b98\u7f51<\/a>\u4e0b\u8f7dmsys2\uff0c\u5982\u679c\u662fwindows 64\u4f4d\uff0c\u5c31\u9009\u62e9 <code>msys2-x86_64.exe<\/code><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-4883188365b98b27caf8a6230b3272f0_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<h3>2.1.2 msys2\u7684\u5b89\u88c5<\/h3>\n<p>msys2\u9ed8\u8ba4\u5b89\u88c5\u5728<code>C:\\msys64<\/code>\uff0c\u5728\u8fd9\u91cc\u6211\u81ea\u5df1\u4e0d\u505a\u4fee\u6539\uff0c\u5b89\u88c5\u8def\u5f84\u8bfb\u8005\u53ef\u81ea\u884c\u51b3\u5b9a\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-dc1632893e60f45174fad1635287caed_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u540e\u9762\u53ea\u8981\u4e00\u76f4\u70b9next\u5c31\u884c\u4e86\u3002<\/p>\n<p>\u5b89\u88c5\u5b8c\u6bd5\u7684\u754c\u9762\u5982\u4e0b<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-cfe700f0d8512dbe9c0325e5bfa55efe_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-be30bcc1c5da3108b3d7a258d89d08de_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<h3>2.1.3 msys2\u7684\u914d\u7f6e<\/h3>\n<p>\u6253\u5f00<code>C:\\msys64\\etc\\pacman.d<\/code>\u53ef\u4ee5\u770b\u5230<code>mirrorlist.mingw32<\/code>\u3001<code>mirrorlist.mingw64<\/code>\u3001<code>mirrorlist.msys<\/code>\u4e09\u4e2a\u6587\u4ef6\u3002<\/p>\n<blockquote><p>\u5728\u6587\u4ef6mirrorlist.mingw32\u4e2d\u52a0\u5165\uff1a<\/p><\/blockquote>\n<pre><code class=\"lang-yaml\">Server = https:\/\/mirrors.tuna.tsinghua.edu.cn\/msys2\/mingw\/i686<\/code><\/pre>\n<blockquote><p>\u5728\u6587\u4ef6mirrorlist.mingw64\u4e2d\u52a0\u5165\uff1a<\/p><\/blockquote>\n<pre><code class=\"lang-yaml\">Server = https:\/\/mirrors.tuna.tsinghua.edu.cn\/msys2\/mingw\/x86_64<\/code><\/pre>\n<blockquote><p>\u5728\u6587\u4ef6mirrorlist.msys\u4e2d\u52a0\u5165\uff1a<\/p><\/blockquote>\n<pre><code class=\"lang-yaml\">Server = https:\/\/mirrors.tuna.tsinghua.edu.cn\/msys2\/msys\/$arch<\/code><\/pre>\n<p>\u8fd9\u4e09\u884c\u662f\u4ece\u6e05\u534e\u955c\u50cf\u4e0b\u8f7d\u8f6f\u4ef6\uff0c\u901f\u5ea6\u4f1a\u5feb\u5f88\u591a\u3002\u968f\u540e\u6253\u5f00msys2\uff0c\u8f93\u5165<code>pacman -Sy<\/code>\u540c\u6b65\u8f6f\u4ef6\u5305\u6570\u636e\u5e93\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-59572532c8e032e42d6e0dda818af8d3_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u7136\u540e\u518d\u8f93\u5165<code>pacman -Su<\/code>\u66f4\u65b0\u8f6f\u4ef6\u5305\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-279ec106e71ea3b751e216520dd47c83_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u5728\u6b64\u671f\u95f4msys2\u63d0\u793a\u4f60\u8f93\u5165y\u4e4b\u540e\u4f1a\u5173\u95ed\uff0c\u91cd\u65b0\u6253\u5f00\u518d\u8f93\u5165\u4e00\u904d<code>pacman -Su<\/code>\u5373\u53ef\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-73b4189f8491690749998bf9cd2a3a62_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-a884a5ab9b248ad61c6d917597266fde_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<h3>2.2 \u5b89\u88c5\u5e76\u914d\u7f6eClang<\/h3>\n<h3>2.2.1 \u5b89\u88c5Clang\u548cLLVM<\/h3>\n<p>\u6253\u5f00msys2\uff0c\u8f93\u5165\uff1a<\/p>\n<pre><code class=\"lang-bash\">pacman -S mingw64\/mingw-w64-x86_64-make mingw64\/mingw-w64-x86_64-gdb mingw64\/mingw-w64-x86_64-clang<\/code><\/pre>\n<p>\u6309\u7167\u63d0\u793a\uff0c\u5c31\u53ef\u4ee5\u5b8c\u6210Clang\u7684\u5b89\u88c5\u4e86\uff08\u987a\u4fbf\u5b89\u88c5\u4e86gdb\u548cmake\uff09\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-c26e03e5caac64a31c0d0e03e98221c1_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u518d\u6267\u884c\u5982\u4e0b\u8bed\u53e5\u5b8c\u6210Clangd\u7684\u5b89\u88c5\u3002<\/p>\n<pre><code class=\"lang-bash\">pacman -S mingw64\/mingw-w64-x86_64-clang-tools-extra<\/code><\/pre>\n<p>\u5b89\u88c5\u6210\u529f\u5982\u4e0b\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-5abaa6bce8d2e8766786a07182648272_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<blockquote><p>\u6ce8\u610f\uff0c\u5982\u679c\u4e2d\u9014\u53d1\u751f\u62a5\u9519\u6216\u8005\u5361\u6b7b\uff0c\u5927\u6982\u7387\u662f\u7f51\u7edc\u95ee\u9898\uff0c\u9000\u51fa\u91cd\u65b0\u8fd0\u884c\u547d\u4ee4\u5c31\u884c\u4e86\u3002\u8fd9\u51e0\u4e2a\u547d\u4ee4\u4e00\u4e2a\u90fd\u4e0d\u80fd\u6f0f\u3002<\/p><\/blockquote>\n<h3>2.2.2 \u6dfb\u52a0\u73af\u5883\u53d8\u91cf<\/h3>\n<p>\u5c06<code>C:\\msys64\\mingw64\\bin<\/code>\u6dfb\u52a0\u5230Path\u4e2d\u3002\u5982\u679c\u4e0d\u77e5\u9053\u4ec0\u4e48\u662fpath\u7684\u8bdd\uff0c\u5c31\u6309\u7167\u5982\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a<\/p>\n<p>1\u3001\u6253\u5f00\u8bbe\u7f6e<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-965446b01c565d60a68bd21a2949a75e_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>2\u3001\u641c\u7d22PATH\uff0c\u9009\u62e9<code>edit the environment variables<\/code><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-9722fe767234901be35b7cfd10c4692d_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>3\u3001\u9009\u62e9<code>environment variables<\/code><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-932da8f1e4df21727486a519a51805ce_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>4\u3001\u9009\u62e9Path<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-ef6cd9b97530508f7b1e47302e2c16d4_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>5\u3001\u70b9\u51fbEdit<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-bc33b607bb288f1f735b918f68d71faa_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>6\u3001\u70b9\u51fbnew<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-fb7185a275218f3ac82ea0d294c248d2_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-123a43f50ef04cd31c8601b368789773_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>7\u3001\u6700\u540e\u70b9OK\u5373\u53ef\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-dcb1b78fa9c4a031d6eb06b66f7e8605_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<h3>2.2.3 \u6d4b\u8bd5\u662f\u5426\u5b89\u88c5\u6210\u529f<\/h3>\n<p>\u9996\u5148\u8fdb\u5165\u547d\u4ee4\u63d0\u793a\u7b26\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-6e5bed22287a4b41d7ec9fe362593654_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\uff08\u6216\u8005Win+R\u8f93\u5165cmd\u56de\u8f66\uff09<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-ccec6fc80dfd40b4bee78fcbd16db585_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u6d4b\u8bd5Clang\u662f\u5426\u5b89\u88c5\uff0c\u8f93\u5165<code>clang -v<\/code><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-cd407818c7fca7a543ae4c67e3c66aa7_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u4e0a\u9762\u8fd9\u6837\u5c31\u662f\u5b89\u88c5\u6210\u529f\u4e86\u3002<\/p>\n<p>\u6d4b\u8bd5Clangd\u662f\u5426\u5b89\u88c5\uff0c\u8f93\u5165<code>clangd<\/code>\u5373\u53ef\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-8e654482b4c60bf2ee37dbc44ccddd1e_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u53ef\u4ee5\u770b\u5230\u5df2\u7ecf\u542f\u52a8\u4e86clangd\u540e\u53f0\uff0c\u5b89\u88c5\u6210\u529f\u3002<\/p>\n<h2>3. \u914d\u7f6esublime text4<\/h2>\n<p>sublime text4<strong>\u5e76\u975e\u5f00\u6e90\u514d\u8d39<\/strong>\uff0c\u4f46\u662f\u4f60\u4e0d\u4ea4\u94b1\u53ef\u4ee5\u4e00\u76f4\u514d\u8d39\u7528\u4e0b\u53bb\u3002\u5b83\u53ea\u4e0d\u8fc7\u4f1a\u65f6\u4e0d\u65f6\u5f39\u7a97\u63d0\u9192\u4f60\u4e00\u4e0b\u8981\u4ea4\u94b1\uff08\u76f8\u5f53\u4e8e\u6c42\u4f60\u6253\u8d4f\uff09<\/p>\n<p>\u8fd9\u91cc\u6211\u4ee5\u6211\u7684\u9700\u6c42\u4e3a\u4f8b\uff0c\u6211\u60f3\u8981\u5728\u67d0\u4e2a\u6587\u4ef6\u5939\u4e0b\u9762\u521b\u5efa\u5f88\u591a\u4e2axxx.cpp\u6587\u4ef6\uff08\u4e00\u770b\u5c31\u662f\u5728\u5237\u9898\u5462\uff09\u7136\u540e\u53ef\u4ee5\u4e00\u952e\u7f16\u8bd1\u8fd0\u884c\uff0c\u4ea7\u751f\u7684\u7f16\u8bd1\u6587\u4ef6\uff08xxx.exe\uff09\u4e0d\u4f1a\u6c61\u67d3\u539f\u76ee\u5f55\u4e0b\u7684cpp\u6587\u4ef6\u3002<\/p>\n<p>\u9996\u5148\u6211\u60f3\u5f62\u6210\u8fd9\u6837\u4e00\u4e2a\u76ee\u5f55\u7ed3\u6784\uff1a<\/p>\n<pre><code class=\"lang-text\">MyProject\n|\n|____code\n|   |___test1.cpp\n|   |___test2.cpp\n|   |___test.c\n|   |___test.py\n|\n|____bin\n|   |___test.exe\n|   |___test1.exe\n|   |___test2.exe\n|\n|____in_out\n    |___test.in\n    |___test.out<\/code><\/pre>\n<p>\u5148\u628aMyProject\uff08\u540d\u5b57\u968f\u4fbf\u53d6\uff09\u62d6\u5230sublime\u91cc\u9762\u53bb\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-1a5513f1708def28c9802298b814a3a2_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u518d\u5728code\u91cc\u9762\u968f\u4fbf\u5199\u4e00\u4e2atest.cpp<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-6a2ba855da337f07182140013cbe0f7e_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u7b2c\u4e00\u6b21\u6309<code>Ctrl+B<\/code>\u4f1a\u5f39\u51fa\u9009\u62e9\u54ea\u4e00\u79cd\u7f16\u8bd1\u65b9\u5f0f\uff0c\u9ed8\u8ba4\u53ea\u6709\u4e24\u4e2a\u2014\u2014single file\u548csingle file run\uff0c\u524d\u8005\u662f\u7f16\u8bd1\uff0c\u540e\u8005\u662f\u7f16\u8bd1+\u8fd0\u884c\uff0c\u8fd9\u91cc\u6211\u4eec\u9009\u62e9\u540e\u8005\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-bb6d799947bb560a084d2d7436a6a7d2_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-ba174096bc0aae61edf36c3d3fc4663e_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>OK\u8fd0\u884c\u7684\u7ed3\u679c\u5f88\u6b63\u5e38\uff08\u5982\u679c\u62a5\u9519\u8bf7\u91cd\u65b0\u542f\u52a8sublime\/\u91cd\u542f\u7535\u8111\u8bd5\u8bd5\uff09\u3002\u4f46\u662f\u663e\u7136\uff0c\u53ef\u6267\u884c\u6587\u4ef6\u88ab\u653e\u5728\u548c\u539f\u6587\u4ef6\u76f8\u540c\u7684\u6587\u4ef6\u5939\u4e0b\uff0c\u8fd9\u6837\u4f1a\u663e\u5f97\u5f88\u4e71\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-2bf65a6416bde87e3dbbc9534c209611_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u90a3\u8be5\u600e\u4e48\u907f\u514d\u5462\uff1f\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u81ea\u5b9a\u4e49\u7f16\u8bd1\uff0c\u6765\u628aexe\u6587\u4ef6\u653e\u5230\u6211\u60f3\u8981\u653e\u7684\u4f4d\u7f6e\uff08MyProject\/bin\uff09<\/p>\n<h3>3.1 \u81ea\u5b9a\u4e49\u5982\u4f55\u7f16\u8bd1\u8fd0\u884cC\/C++<\/h3>\n<p>sublime\u901a\u8fc7sublime-build\u6587\u4ef6\u81ea\u5b9a\u4e49\u5982\u4f55\u7f16\u8bd1\u8fd0\u884cC\/C++\u3002<\/p>\n<p>\u5728<code>Tools-&gt;Build System-&gt;New Build System<\/code>\u4e2d\u65b0\u5efa\u7f16\u8bd1\u6587\u4ef6\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-fccca649fb6ae971796bb8bdb574a352_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u5148<code>Ctrl+S<\/code>\u62a5\u5b58\u4e3a<code>CppBuilder.sublime-build<\/code>\uff0c\u5f53\u7136Cpp Builder\u4e5f\u662f\u6211\u968f\u4fbf\u53d6\u7684\u3002\u5927\u5bb6\u53ef\u4ee5\u968f\u610f\u3002<\/p>\n<p>\u628acppbuilder\u91cc\u9762\u672c\u6765\u5c31\u6709\u7684\u5168\u90e8\u5220\u5149\uff0c\u6362\u6210\u8fd9\u4e9b\uff1a<\/p>\n<pre><code class=\"lang-json\">{\n    \/\/ Windows\n\n    \/\/ build only\n    &quot;shell_cmd&quot;: &quot;clang++ -std=c++11 -g -Wall ${file} -o ${file_path}\/..\/bin\/${file_base_name}&quot;,\n    \/\/ check the file name using regex\n    &quot;file_regex&quot;: &quot;^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$&quot;,\n    \/\/ set the encoding to utf-8\n    &quot;encoding&quot;: &quot;utf-8&quot;,\n    \/\/ doesn&#039;t matter if I use full path\n    &quot;working_dir&quot;: &quot;${file_path}&quot;,\n    \/\/ only C and Cpp files can use this sublime-build file\n    &quot;selector&quot;: &quot;source.c, source.c++&quot;,\n    &quot;variants&quot;: [\n        {\n            \/\/ build and run in CMD\n            \/\/ you can type something in CMD then your progam can get its inputs\n            \/\/ [Recommanded]\n            &quot;name&quot;: &quot;Run in CMD&quot;,\n            &quot;shell_cmd&quot;: &quot;clang++ -std=c++11 -g -Wall \\&quot;${file}\\&quot; -o \\&quot;${file_path}\/..\/bin\/${file_base_name}\\&quot; &amp;&amp; start cmd \/c \\&quot;\\&quot;${file_path}\/..\/bin\/${file_base_name}\\&quot; &amp; pause \\&quot;&quot;\n        },\n        {\n            \/\/ build and run in sublime\n            \/\/ but you can&#039;t input anything to your progam\n            &quot;name&quot;: &quot;Run in Sublime&quot;,\n            &quot;shell_cmd&quot;: &quot;clang++ -std=c++11 -g -Wall \\&quot;${file}\\&quot; -o \\&quot;${file_path}\/..\/bin\/${file_base_name}\\&quot; &amp;&amp; cmd \/c \\&quot;${file_path}\/..\/bin\/${file_base_name}\\&quot;&quot;\n        }\n    ]\n}<\/code><\/pre>\n<p>\u53ef\u4ee5\u770b\u5230\uff0c\u6211\u4f7f\u7528\u4e86\u4e24\u79cd\u8fd0\u884c\u65b9\u5f0f\u2014\u2014\u5728sublime\u5185\u90e8\u76f4\u63a5\u8fd0\u884c\u4ee5\u53ca\u5728 windows\u81ea\u5e26\u7684cmd\u4e2d\u8fd0\u884c\uff0c\u4e3a\u4ec0\u4e48\u8981\u9009\u7528cmd\u5462\uff1f\u56e0\u4e3asublime\u6709\u4e2a\u7f3a\u70b9\uff0c\u5c31\u662f\u5b83\u6240\u6709\u6587\u672c\u90fd\u662f\u53ef\u4ee5\u7f16\u8f91\u7684\uff0c\u4e5f\u5c31\u662f\u8bf4\u6211\u4eec\u6ca1\u6cd5\u50cf\u6b63\u5e38\u547d\u4ee4\u884c\u4e00\u6837\u8f93\u5165xxxx\uff0c\u7136\u540e\u56de\u8f66\u3002\uff08\u4f60\u4eec\u8bd5\u8bd5\u5c31\u77e5\u9053\u6211\u8bf4\u7684\u4ec0\u4e48\u610f\u601d\u4e86\uff09<\/p>\n<blockquote><p>\u6ce8\u610f\uff1asublime-build\u6587\u4ef6\u4e2d\u6d89\u53ca\u5f88\u591a\u65b9\u9762\u7684\u77e5\u8bc6\uff0c\u800c\u4e14\u6781\u5176\u8106\u5f31\uff0c\u4e00\u6539\u52a8\u5c31\u53ef\u80fd\u8fd0\u884c\u5931\u8d25\u3002<\/p><\/blockquote>\n<p>\u4fdd\u5b58<code>CppBuilder.sublime-build<\/code>\u4ee5\u540e\uff0c\u901a\u8fc7<code>Ctrl+Shift+B<\/code>\u9009\u62e9\u7f16\u8bd1\u547d\u4ee4\uff0c\u9009\u53d6Run In CMD\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-dc79c26cb27f4f8aec1dcf6cce932b53_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-a78efc5e670460e03255b048f332d663_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u6210\u529f\u8fd0\u884c\uff0c\u800c\u4e14\u628a\u53ef\u6267\u884c\u6587\u4ef6\u548c\u6e90\u6587\u4ef6\u5b8c\u7f8e\u9694\u5f00\uff01<\/p>\n<p>\u4f46\u662f\u6211\u4e0d\u60f3\u6bcf\u6b21\u90fd\u5f00\u4e00\u4e2a\u9ed1\u6846\u6846\u3002\u3002\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-85a042bd9c202d011f00c4d3f5b328ac_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u5f53\u7136\u53ef\u4ee5\uff0c\u6b22\u8fce\u8fdb\u5165\u63d2\u4ef6\u7684\u4e16\u754c\uff01<\/p>\n<h3>3.2 \u5b89\u88c5package control\u63d2\u4ef6\u7ba1\u7406\u5de5\u5177<\/h3>\n<p><code>Ctrl+Shift+P<\/code>\u6253\u5f00sublime\u7684<strong>\u547d\u4ee4\u9762\u677f<\/strong>\u3002<\/p>\n<p>\u8f93\u5165install package control\u56de\u8f66\u8fdb\u884c\u5b89\u88c5\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-a432de559216fef547959e69dec99961_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-8b0548377a4b2b3d92079eca3a78acb5_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u4e0a\u9762\u8fd9\u6837\u5c31\u7b97\u5b89\u88c5\u6210\u529f\u4e86\u3002<\/p>\n<h3>3.3 \u5b89\u88c5Terminus<\/h3>\n<blockquote><p>Terminus\u662f\u4e00\u4e2asublime\u63d2\u4ef6\uff0c\u76ee\u7684\u5c31\u662f\u8865\u5168\u521a\u521a\u6240\u8bf4\u7684\u7f3a\u70b9\uff0c\u5b9e\u73b0sublime\u5185\u7f6e\u7ec8\u7aef\u3002<\/p><\/blockquote>\n<p><code>Ctrl+Shift+P<\/code>\u6253\u5f00sublime\u7684<strong>\u547d\u4ee4\u9762\u677f<\/strong>\u3002<\/p>\n<p>\u8f93\u5165PCI\u7136\u540e\u56de\u8f66\uff08package control install\uff09<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-450518effbfb9171d78ef2fd28898e6b_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u8f93\u5165terminus\uff0c\u56de\u8f66\u5f00\u59cb\u5b89\u88c5\uff0c\u53ef\u4ee5\u770b\u5230\u5de6\u4e0b\u89d2\u7684\u5b89\u88c5\u63d0\u793a\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-6e937d14af023d8b78b3c5c33298fef3_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u91cd\u542fsublime\uff08sublime\u4e00\u822c\u4e0d\u9700\u8981\u6bcf\u6b21\u6539\u52a8\u90fd\u91cd\u542f\uff0c\u4f46\u662f\u9047\u4e8b\u4e0d\u51b3\u91cd\u542f\u603b\u5f52\u6ca1\u9519\uff09<\/p>\n<p>\u8fdb\u5165Terminus\u7684\u8bbe\u7f6e\uff1a<code>Preferences-&gt;Package Settings-&gt;Terminus-&gt;Settings<\/code><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-b71ed31acc4200c94dac170b1c79f3d1_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u7167\u65e7\uff0c\u628a\u91cc\u9762\u7684\u4e1c\u897f\u5220\u4e86\u6539\u6210\uff08\u6ce8\u610f\u5230\u4e24\u7aef\u4e00\u5b9a\u5f97\u662f\u82b1\u62ec\u53f7\uff09\uff1a<\/p>\n<pre><code class=\"lang-json\">{\n    &quot;256color&quot;: true,\n    &quot;brighten_bold_text&quot;: false,\n    &quot;theme&quot;: &quot;chalk&quot;,\n}<\/code><\/pre>\n<p>\u5f53\u7136\u8fd9\u4e3b\u9898\u662f\u6211\u7684\u4e2a\u4eba\u559c\u597d\uff0c\u5927\u5bb6\u53ef\u4ee5\u4e00\u4e2a\u4e2a\u8bd5\uff0c\u770b\u770b\u81ea\u5df1\u559c\u6b22\u54ea\u4e2a\u3002<\/p>\n<p>\u8fd9\u65f6\uff0c\u6211\u4eec\u8fd8\u662f<code>Ctrl+Shift+P<\/code>\u6253\u5f00\u9762\u677f\uff0c\u8f93\u5165terminus\u5c31\u53ef\u4ee5\u67e5\u770b\u5b83\u7684\u4e3b\u8981\u529f\u80fd\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-e23938871f44d1ae60578f3ba9b92728_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u5c31\u6bd4\u5982\u6211\u4eec\u9009\u62e9open default shell in tab<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-530d491cd3480c8cab3e1ae58f16c31b_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u4f1a\u53d1\u73b0\u547d\u4ee4\u884c\u5728sublime\u4e2d\u6253\u5f00\u4e86\uff0c\u800c\u4e14\u8def\u5f84\u81ea\u52a8\u5207\u6362\u5230\u4e86MyProject\u4e0b\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-6835367437efda31c036f608f551ee61_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-11fd3d69508ef294232dccd3a59ebefb_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u5f53\u7136\uff0c\u4f7f\u7528Terminus\u8fd0\u884cC\/C++\u4e5f\u4e0d\u5728\u8bdd\u4e0b\uff0c\u6839\u636eTerminus\u5b98\u7f51\u7684\u914d\u7f6e\uff0c\u6211\u4eec\u53ef\u4ee5\u5c06<code>CppBuilder.sublime-build<\/code>\u6dfb\u52a0\u4e00\u4e9b\u9009\u9879\u3002<\/p>\n<pre><code class=\"lang-json\">{\n    \/\/ Windows\n\n    \/\/ build only\n    &quot;shell_cmd&quot;: &quot;clang++ -std=c++11 -g -Wall ${file} -o ${file_path}\/..\/bin\/${file_base_name}&quot;,\n    \/\/ check the file name using regex\n    &quot;file_regex&quot;: &quot;^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$&quot;,\n    \/\/ set the encoding to utf-8\n    &quot;encoding&quot;: &quot;utf-8&quot;,\n    \/\/ doesn&#039;t matter if I use full path\n    &quot;working_dir&quot;: &quot;${file_path}&quot;,\n    \/\/ only C and Cpp files can use this sublime-build file\n    &quot;selector&quot;: &quot;source.c, source.c++&quot;,\n    &quot;variants&quot;: [\n        {\n            \/\/ build and run in Terminus (sublime plugin)\n            \/\/ [Recommanded]\n            &quot;name&quot;: &quot;Run In Terminus&quot;,\n            &quot;target&quot;: &quot;terminus_exec&quot;,\n            &quot;cancel&quot;: &quot;terminus_cancel_build&quot;,\n            &quot;shell_cmd&quot;: &quot;clang++ -std=c++11 -g -Wall \\&quot;${file}\\&quot; -o \\&quot;${file_path}\/..\/bin\/${file_base_name}\\&quot; &amp;&amp; cmd \/c \\&quot;${file_path}\/..\/bin\/${file_base_name}\\&quot;&quot;\n        },\n        {\n            \/\/ build and run in CMD\n            \/\/ you can type something in CMD then your progam can get its inputs\n            \/\/ [Recommanded]\n            &quot;name&quot;: &quot;Run in CMD&quot;,\n            &quot;shell_cmd&quot;: &quot;clang++ -std=c++11 -g -Wall \\&quot;${file}\\&quot; -o \\&quot;${file_path}\/..\/bin\/${file_base_name}\\&quot; &amp;&amp; start cmd \/c \\&quot;\\&quot;${file_path}\/..\/bin\/${file_base_name}\\&quot; &amp; pause \\&quot;&quot;\n        },\n        {\n            \/\/ build and run in sublime\n            \/\/ but you can&#039;t input anything to your progam\n            &quot;name&quot;: &quot;Run in Sublime&quot;,\n            &quot;shell_cmd&quot;: &quot;clang++ -std=c++11 -g -Wall \\&quot;${file}\\&quot; -o \\&quot;${file_path}\/..\/bin\/${file_base_name}\\&quot; &amp;&amp; cmd \/c \\&quot;${file_path}\/..\/bin\/${file_base_name}\\&quot;&quot;\n        }\n    ]\n}<\/code><\/pre>\n<p>\u8fd9\u91cc\u5949\u4e0a\u8bc4\u8bba\u533a\u60f3\u8981\u7684Mac\u4e0b\u914d\u7f6e\uff08\u6211\u81ea\u7528\u7684\uff0c\u548c\u4e0a\u9762\u7684\u6548\u679c\u4e00\u6a21\u4e00\u6837\uff09<\/p>\n<pre><code class=\"lang-json\">{\n    \/\/ MacOS\n\n    &quot;cmd&quot;: [\n        &quot;bash&quot;,\n        &quot;-c&quot;,\n        &quot;clang++ &#039;${file}&#039; -std=c++11 -stdlib=libc++ -o &#039;${file_path}\/..\/bin\/${file_base_name}&#039; &amp;&amp; ${file_path}\/..\/bin\/${file_base_name}&quot;\n    ],\n    &quot;file_regex&quot;: &quot;^(..{FNXX==XXFN}*):([0-9]+):?([0-9]+)?:? (.*)$&quot;,\n    &quot;working_dir&quot;: &quot;${file_path}&quot;,\n    &quot;encoding&quot;: &quot;utf-8&quot;,\n    &quot;selector&quot;: &quot;source.c, source.c++&quot;,\n    &quot;variants&quot;: [\n        {\n            &quot;name&quot;: &quot;Run In Terminus&quot;,\n            &quot;target&quot;: &quot;terminus_exec&quot;,\n            &quot;cancel&quot;: &quot;terminus_cancel_build&quot;,\n            &quot;cmd&quot;: [\n                &quot;bash&quot;,\n                &quot;-c&quot;,\n                &quot;clang++ &#039;${file}&#039; -std=c++11 -stdlib=libc++ -o &#039;${file_path}\/..\/bin\/${file_base_name}&#039; &amp;&amp; ${file_path}\/..\/bin\/${file_base_name}&quot;\n            ]\n        },\n        {\n            &quot;name&quot;: &quot;Create Input File&quot;,\n            &quot;cmd&quot;: [\n                &quot;bash&quot;,\n                &quot;-c&quot;,\n                &quot;touch ${file_path}\/..\/in_out\/${file_base_name}.in &amp;&amp; open -a Sublime\\\\ Text ${file_path}\/..\/in_out\/${file_base_name}.in&quot;\n            ]\n        },\n        {\n            &quot;name&quot;: &quot;Run In Terminal&quot;,\n            &quot;cmd&quot;: [\n                &quot;bash&quot;,\n                &quot;-c&quot;,\n                &quot;clang++ &#039;${file}&#039; -std=c++11 -stdlib=libc++ -o &#039;${file_path}\/..\/bin\/${file_base_name}&#039; &amp;&amp; open -a Terminal.app &#039;${file_path}\/..\/bin\/${file_base_name}&#039;&quot;\n            ]\n        },\n    ]\n}<\/code><\/pre>\n<p>Create Input File\u662f\u65b0\u5efa\u8f93\u5165\u6587\u4ef6\u7684\u610f\u601d\uff0c\u4e0d\u9700\u8981\u7684\u53ef\u4ee5\u628a\u5b83\u5220\u6389\u3002\u8fd8\u6709\uff0c\u63d0\u9192\u4e00\u4e0b\uff0csublime-build\u4e2d\u6700\u5f00\u59cb\u90a3\u884c\u662f\"cmd\"\uff0c\"variants\"\u91cc\u9762\u4e5f\u5fc5\u987b\u662f\u201ccmd\u201d\uff1b\u6700\u5f00\u59cb\u662f\"shell_cmd\"\uff0c\"variants\"\u91cc\u9762\u4e5f\u5fc5\u987b\u662f\u201cshell_cmd\u201d\u3002<\/p>\n<p>\u7136\u540e<code>Ctrl+Shift+B<\/code>\u9009\u62e9\u5982\u4f55\u7f16\u8bd1\uff0c\u9009\u62e9Run In Terminus<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-1b34055b6396f983a32700f41978614c_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-1f34d4b028a8456444add5a6b3403917_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>OK\uff0c\u7b80\u76f4\u5b8c\u7f8e\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-85a042bd9c202d011f00c4d3f5b328ac_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u55ef\uff1f\u5c45\u7136\u60f3\u8981\u4eab\u53d7Clion\u540c\u6b3e\u4ee3\u7801\u8865\u5168\u3001\u63d0\u793a\u3001\u8df3\u8f6c\u3001\u683c\u5f0f\u5316\uff1f\u53ea\u80fd\u796d\u51faLSP\u63d2\u4ef6\u4e86\uff01<\/p>\n<p>\uff08\u4e0d\u662f\u90a3\u4e2alsp\uff09<\/p>\n<h3>3.4 \u5b89\u88c5Lsp\u63d2\u4ef6<\/h3>\n<p><code>Ctrl+Shift+P<\/code>\u6253\u5f00sublime\u7684<strong>\u547d\u4ee4\u9762\u677f<\/strong>\u3002<\/p>\n<p>\u8f93\u5165PCI\u7136\u540e\u56de\u8f66\uff08package control install\uff09<\/p>\n<p>\u8f93\u5165lsp\u7136\u540e\u56de\u8f66\uff0c\u5f88\u5feb\u5c31\u88c5\u597d\u4e86\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-b9c7766d40fe0e5e8a2d2818c794a833_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u6ce8\u610f\uff0clsp\u53ea\u662f\u4e00\u4e2a\u8bed\u8a00\u5904\u7406\u7684\u540e\u7aef\uff0c\u9700\u8981\u5b89\u88c5\u76f8\u5e94\u7684\u524d\u7aef\u624d\u80fd\u53d1\u6325\u4f5c\u7528\u3002<\/p>\n<h3>3.4.1 lsp-clangd<\/h3>\n<p>\u8fd9\u91cc\u6211\u4eec\u4f7f\u7528Clangd\u524d\u7aef\u2014\u2014\u7ee7\u7eed\u5b89\u88c5lsp-clangd\u63d2\u4ef6\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-77ea9764be199b58527191b4a3007e43_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u88c5\u5b8c\u4e86\u4ee5\u540e\u91cd\u542fsublime\uff0c\u5c31\u80fd\u770b\u5230\u6548\u679c\u4e86\u3002<\/p>\n<p><img decoding=\"async\" src=\"Kapture\" alt=\" title=\"2022-11-23 at 15.14.36.gif\"\" title=\" title=\"2022-11-23 at 15.14.36.gif\"\"><\/p>\n<p>\u6211\u8fd9\u8fd8\u662f\u5728\u865a\u62df\u673a\u91cc\u9762\u8fd0\u884c\u7684\uff0c\u53ef\u4ee5\u770b\u5230\u771f\u7684\u662f\u5065\u6b65\u5982\u98de\uff0c\u7528\u8d77\u6765\u4e0d\u8981\u592a\u723d\u3002\u8bd5\u60f3\u4e00\u4e0b\u5728\u865a\u62df\u673a\u91cc\u8fd0\u884cClion\u6216\u8005VS\uff0c\u5206\u5206\u949f\u949f\u7ed9\u4f60\u5361\u6210ppt\u3002<\/p>\n<h3>3.4.2 lsp-json<\/h3>\n<p>lsp-json\u7684\u5b89\u88c5\u4f7f\u6211\u4eec\u80fd\u591f\u66f4\u9ad8\u6548\u5730\u8bbe\u7f6esublime\u3002\u8c01\u7528\u8c01\u77e5\u9053\uff0c\u5199json\u6700\u723d\u7684\u5c31\u662f\u5b83\u3002<\/p>\n<p>\u540c\u7406\uff0c\u5728\u547d\u4ee4\u9762\u677f\u5b89\u88c5lsp-json\u3002\u4f46\u662f\u5b89\u88c5\u5b8c\u6210\u5b83\u4f1a\u63d0\u793a\u4f60\u4e0b\u8f7dnode-js\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-71ca2da97434cea33a7c1af002381102_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u6309\u7167\u5b83\u8bf4\u7684\u505a\u5c31\u5b8c\u4e86\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-f7c510d1e6af927661ce42adcf85ca93_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<h3>3.4.3 lsp-pyright<\/h3>\n<p>\u672c\u4eba\u9664\u4e86C\/C++\uff0c\u8fd8\u9700\u8981\u7528sublime\u5199\u4e00\u70b9python\uff0c\u8fd9\u65f6lsp-pyright\u5c31\u662f\u4e00\u4e2a\u5f88\u597d\u7684\u9009\u62e9\uff0c\u4f46\u662f\u4e0e\u672c\u6587\u4e3b\u9898\u65e0\u5173\uff0c\u8fd9\u91cc\u4e0d\u591a\u52a0\u8d58\u8ff0\u3002<\/p>\n<h3>3.4.4 \u914d\u7f6elsp<\/h3>\n<p>\u5982\u679c\u4f60\u5df2\u7ecf\u88c5\u597d\u4e86lsp-json\u7684\u8bdd\uff0c\u8fd9\u4e00\u6b65\u5176\u5b9e\u624b\u6253\u548c\u590d\u5236\u9ecf\u8d34\u5dee\u4e0d\u591a\u5feb\uff08\uff09<\/p>\n<p>\u914d\u7f6e\u4e00\u4e0blsp\uff1a<\/p>\n<p>\u9996\u5148\u662f\u5230<code>Preferences-&gt;Package Settings-&gt;LSP-&gt;Settings<\/code>\u4e2d\uff0c\u5199\u5165\u8fd9\u6837\u51e0\u884c\uff1a<\/p>\n<pre><code class=\"lang-json\">{\n    \/\/ \u5728\u4e3b\u9875\u9762\u53ea\u663e\u793aerror\u7ea2\u8272\u4e0b\u5212\u7ebf\n    \/\/&quot;show_diagnostics_severity_level&quot;: 1,\n    \/\/ \u4ee3\u7801\u63d0\u793a\u663e\u793a\u706f\u6ce1\u56fe\u6807\n    &quot;show_code_actions&quot;: &quot;bulb&quot;,\n    \/\/ \u4fdd\u5b58\u65f6\u81ea\u52a8\u683c\u5f0f\u5316\n    &quot;lsp_format_on_save&quot;: true,\n}<\/code><\/pre>\n<p>\u518d\u5230<code>Preferences-&gt;Package Settings-&gt;LSP-&gt;Servers-&gt;LSP-clangd<\/code>\u4e2d\uff0c\u5199\u5165\u8fd9\u6837\u51e0\u884c\uff1a<\/p>\n<pre><code class=\"lang-json\">\/\/ Settings in here override those in &quot;LSP-clangd\/LSP-clangd.sublime-settings&quot;\n{\n    &quot;initializationOptions&quot;: {\n        \/\/ \u542f\u7528clang-tidy\u4ee3\u7801\u68c0\u67e5\uff0c\u53ef\u80fd\u542f\u7528\u540ewarning\u4f1a\u6bd4\u8f83\u591a\uff0c\u81ea\u5df1\u770b\u7740\u529e\u5427\n        &quot;clangd.clang-tidy&quot;: true,\n        \/\/ \u7f8e\u5316clangd\u8f93\u51fa\u7684JSON\n        &quot;clangd.pretty&quot;: true,\n    }\n}<\/code><\/pre>\n<p>\u4f46\u662f\u5149\u5728\u8fd9\u91cc\u8bbe\u7f6eclang-tidy\u662f\u6ca1\u6709\u7528\u7684\uff0c\u8fd8\u5f97\u5728<code>project\/code<\/code>\uff08\u6e90\u6587\u4ef6\u6240\u5728\u76ee\u5f55\uff09\u4e0b\u65b0\u5efa<code>.clang-tidy<\/code>\u6587\u4ef6\uff0c\u5199\u5165\uff1a<\/p>\n<pre><code class=\"lang-yaml\">---\nChecks: &quot;bugprone-*,\\\ngoogle-*,\\\nmisc-*,\\\nmodernize-*,\\\nperformance-*,\\\nreadability-*,\\\nportability-*,\\\n&quot;\nHeaderFilterRegex: &#039;Source\/cm[^\/]*\\.(h|hxx|cxx)$&#039;\nCheckOptions:\n  - key:   modernize-use-default-member-init.UseAssignment\n    value: &#039;1&#039;\n  - key:   modernize-use-equals-default.IgnoreMacros\n    value: &#039;0&#039;\n  - key:   modernize-use-auto.MinTypeNameLength\n    value: &#039;80&#039;\n...<\/code><\/pre>\n<h3>3.4.5 \u914d\u7f6eclang-format<\/h3>\n<p>\u5199\u4ee3\u7801\u600e\u4e48\u80fd\u5c11\u7684\u4e86\u81ea\u52a8\u683c\u5f0f\u5316\u5462\u3002clang-format\u7684\u914d\u7f6e\u5f88\u7b80\u5355\uff0c\u53ea\u9700\u5728<code>project\/code<\/code>\u4e0b\u65b0\u5efa<code>.clang-format<\/code>\u6587\u4ef6\uff0c\u5199\u5165\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n<blockquote><p>\u5f53\u7136\u8fd9\u53ea\u662f\u6211\u7684\u914d\u7f6e\uff0c\u5927\u90e8\u5206\u90fd\u662f\u6284\u7684\u7f51\u4e0a\u7684\uff0c\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u559c\u597d\u6539\u52a8\u3002<\/p><\/blockquote>\n<pre><code class=\"lang-yaml\">---\n# \u8bed\u8a00: None, Cpp, Java, JavaScript, ObjC, Proto, TableGen, TextProto\nLanguage:        Cpp\nBasedOnStyle:  WebKit\n# \u8bbf\u95ee\u8bf4\u660e\u7b26(public\u3001private\u7b49)\u7684\u504f\u79fb\nAccessModifierOffset: -4\n# \u5f00\u62ec\u53f7(\u5f00\u5706\u62ec\u53f7\u3001\u5f00\u5c16\u62ec\u53f7\u3001\u5f00\u65b9\u62ec\u53f7)\u540e\u7684\u5bf9\u9f50: Align, DontAlign, AlwaysBreak(\u603b\u662f\u5728\u5f00\u62ec\u53f7\u540e\u6362\u884c)\nAlignAfterOpenBracket: Align\n# \u5bf9\u9f50\u6570\u7ec4\u5217\nAlignArrayOfStructures: None\n# \u8fde\u7eed\u8d4b\u503c\u65f6\uff0c\u5bf9\u9f50\u6240\u6709\u7b49\u53f7\nAlignConsecutiveAssignments: None\n# \u5bf9\u9f50\u8fde\u7eed\u4f4d\u5b57\u6bb5\nAlignConsecutiveBitFields: None\n# \u8fde\u7eed\u58f0\u660e\u65f6\uff0c\u5bf9\u9f50\u6240\u6709\u58f0\u660e\u7684\u53d8\u91cf\u540d\nAlignConsecutiveDeclarations: None\n# \u5bf9\u9f50\u8fde\u7eed\u5b8f\u5b9a\u4e49\nAlignConsecutiveMacros: AcrossComments\n# \u9003\u8131\u6362\u884c(\u4f7f\u7528\u53cd\u659c\u6760\u6362\u884c)\u7684\u53cd\u659c\u6760\nAlignEscapedNewlines: Left\n# \u64cd\u4f5c\u6570\u5bf9\u9f50\u65b9\u5f0f\nAlignOperands:   Align\n# \u5c3e\u968f\u7684\u6ce8\u91ca\u5bf9\u9f50\nAlignTrailingComments: true\n# \u5141\u8bb8\u51fd\u6570\u53c2\u6570\u5728\u4e00\u884c\nAllowAllArgumentsOnNextLine: true\n# \u5141\u8bb8\u51fd\u6570\u58f0\u660e\u7684\u6240\u6709\u53c2\u6570\u5728\u653e\u5728\u4e00\u884c\nAllowAllParametersOfDeclarationOnNextLine: true\n# \u5141\u8bb8\u77ed\u7684\u5757\u653e\u5728\u540c\u4e00\u884c\nAllowShortBlocksOnASingleLine: true\n# \u5141\u8bb8\u77ed\u7684case\u6807\u7b7e\u653e\u5728\u540c\u4e00\u884c\nAllowShortCaseLabelsOnASingleLine: true\n# \u5141\u8bb8\u77ed\u7684\u679a\u4e3e\u653e\u5728\u540c\u4e00\u884c\nAllowShortEnumsOnASingleLine: true\n# \u5141\u8bb8\u77ed\u7684\u51fd\u6570\u653e\u5728\u540c\u4e00\u884c\nAllowShortFunctionsOnASingleLine: Empty\n# \u5141\u8bb8\u77ed\u7684if\u8bed\u53e5\u4fdd\u6301\u5728\u540c\u4e00\u884c\nAllowShortIfStatementsOnASingleLine: false\n# \u5141\u8bb8\u77ed\u7684\u533f\u540d\u51fd\u6570lamda\u8868\u8fbe\u5f0f\u653e\u5728\u540c\u4e00\u884c\nAllowShortLambdasOnASingleLine: Empty\n# \u5141\u8bb8\u77ed\u7684\u5faa\u73afwhile\u4fdd\u6301\u5728\u540c\u4e00\u884c\nAllowShortLoopsOnASingleLine: false\n# \u603b\u662f\u5728\u8fd4\u56de\u7c7b\u578b\u540e\u6362\u884c\nAlwaysBreakAfterReturnType: None\n# \u603b\u662f\u5728\u591a\u884cstring\u5b57\u9762\u91cf\u524d\u6362\u884c\nAlwaysBreakBeforeMultilineStrings: false\n# \u603b\u662f\u5728template\u58f0\u660e\u540e\u6362\u884c\nAlwaysBreakTemplateDeclarations: MultiLine\n# \u5b8f\u5c5e\u6027\nAttributeMacros: [&#039;__capability&#039;, &#039;__output&#039;, &#039;__ununsed&#039;]\n# \u8868\u793a\u51fd\u6570\u5b9e\u53c2\u8981\u4e48\u90fd\u5728\u540c\u4e00\u884c\uff0c\u8981\u4e48\u90fd\u5404\u81ea\u4e00\u884c\nBinPackArguments: true\n# false\u8868\u793a\u6240\u6709\u5f62\u53c2\u8981\u4e48\u90fd\u5728\u540c\u4e00\u884c\uff0c\u8981\u4e48\u90fd\u5404\u81ea\u4e00\u884c\nBinPackParameters: true\n# \u4f4d\u57df\u5192\u53f7\u5bf9\u9f50\u65b9\u5f0f\nBitFieldColonSpacing : Both\n# \u5927\u62ec\u53f7\u6362\u884c\uff0c\u53ea\u6709\u5f53BreakBeforeBraces\u8bbe\u7f6e\u4e3aCustom\u65f6\u624d\u6709\u6548\uff0c\u8bbe\u7f6e\u5176\u4ed6\u914d\u7f6e\u5219\u4e0b\u9762\u4e0d\u751f\u6548\nBraceWrapping :\n  # class\u5b9a\u4e49\u540e\u9762\n  AfterClass: true\n  # \u63a7\u5236\u8bed\u53e5\u540e\u9762\n  AfterControlStatement:  true\n  # enum\u5b9a\u4e49\u540e\u9762\n  AfterEnum:  true\n  # \u51fd\u6570\u5b9a\u4e49\u540e\u9762\n  AfterFunction:  true\n  # \u547d\u540d\u7a7a\u95f4\u5b9a\u4e49\u540e\u9762\n  AfterNamespace: true\n  # ObjC\u5b9a\u4e49\u540e\u9762\n  AfterObjCDeclaration: true\n  # struct\u5b9a\u4e49\u540e\u9762\n  AfterStruct:  true\n  # union\u5b9a\u4e49\u540e\u9762\n  AfterUnion: true\n  # catch\u4e4b\u524d\n  BeforeCatch:  true\n  # else\u4e4b\u524d\n  BeforeElse: false\n  # \u7f29\u8fdb\u5927\u62ec\u53f7\n  IndentBraces: false\n  # unknown:\n  AfterCaseLabel:  true\n  AfterExternBlock: true\n  BeforeLambdaBody: true\n  BeforeWhile: true\n  SplitEmptyFunction: true\n  SplitEmptyRecord: true\n  SplitEmptyNamespace: true\n# \u5728java\u5b57\u6bb5\u7684\u6ce8\u91ca\u540e\u6362\u884c\nBreakAfterJavaFieldAnnotations: false\n# \u5728\u4e8c\u5143\u8fd0\u7b97\u7b26\u524d\u6362\u884c\nBreakBeforeBinaryOperators: None\n# \u5728\u5927\u62ec\u53f7\u524d\u6362\u884c\nBreakBeforeBraces: Custom\n# \u5728concept\u524d\u6362\u884c\n# BreakBeforeConceptDeclarations: Never\n# \u5728\u4e09\u5143\u8fd0\u7b97\u7b26\u524d\u6362\u884c\nBreakBeforeTernaryOperators: true\n# \u6784\u9020\u51fd\u6570\u521d\u59cb\u503c\u8bbe\u5b9a\u9879\u6362\u884c\u6837\u5f0f\nBreakConstructorInitializers: BeforeColon\n# \u7ee7\u627f\u5217\u8868\u6837\u5f0f\nBreakInheritanceList: AfterColon\n# \u5b57\u7b26\u4e32\u6362\u884c\u6837\u5f0f\nBreakStringLiterals: false\n# \u6bcf\u884c\u5b57\u7b26\u7684\u9650\u5236\uff0c0\u8868\u793a\u6ca1\u6709\u9650\u5236\nColumnLimit:     80\n# \u63cf\u8ff0\u5177\u6709\u7279\u6b8a\u610f\u4e49\u7684\u6ce8\u91ca\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\uff0c\u5b83\u4e0d\u5e94\u8be5\u88ab\u5206\u5272\u4e3a\u591a\u884c\u6216\u4ee5\u5176\u5b83\u65b9\u5f0f\u6539\u53d8\nCommentPragmas:  &#039;^ IWYU pragma:&#039;\n# \u5728\u65b0\u884c\u4e0a\u58f0\u660e\u6bcf\u4e2a\u547d\u540d\u7a7a\u95f4\nCompactNamespaces: false\n# \u6784\u9020\u51fd\u6570\u7684\u521d\u59cb\u5316\u5217\u8868\u7684\u7f29\u8fdb\u5bbd\u5ea6\nConstructorInitializerIndentWidth: 4\n# \u5ef6\u7eed\u7684\u884c\u7684\u7f29\u8fdb\u5bbd\u5ea6\nContinuationIndentWidth: 4\n# \u53bb\u9664C++11\u7684\u5217\u8868\u521d\u59cb\u5316\u7684\u5927\u62ec\u53f7{\u540e\u548c}\u524d\u7684\u7a7a\u683c\nCpp11BracedListStyle: true\n# \u7ee7\u627f\u6700\u5e38\u7528\u7684\u6362\u884c\u65b9\u5f0f\nDeriveLineEnding: true\n# \u7ee7\u627f\u6700\u5e38\u7528\u7684\u6307\u9488\u548c\u5f15\u7528\u7684\u5bf9\u9f50\u65b9\u5f0f\nDerivePointerAlignment: false\n# \u5173\u95ed\u683c\u5f0f\u5316\nDisableFormat:   false\n# \u5220\u9664\u8bbf\u95ee\u4fee\u9970\u7b26\u540e\u7684\u6240\u6709\u7a7a\u884c\nEmptyLineAfterAccessModifier: Never\n# \u4ec5\u5f53\u8bbf\u95ee\u4fee\u9970\u7b26\u5f00\u59cb\u4e00\u4e2a\u65b0\u7684\u903b\u8f91\u5757\u65f6\u624d\u6dfb\u52a0\u7a7a\u884c\nEmptyLineBeforeAccessModifier: Never\n# \u81ea\u52a8\u68c0\u6d4b\u51fd\u6570\u7684\u8c03\u7528\u548c\u5b9a\u4e49\u662f\u5426\u88ab\u683c\u5f0f\u4e3a\u6bcf\u884c\u4e00\u4e2a\u53c2\u6570(Experimental)\nExperimentalAutoDetectBinPacking: false\n# \u81ea\u52a8\u8865\u5145namespace\u6ce8\u91ca\nFixNamespaceComments: false\n# \u9700\u8981\u88ab\u89e3\u8bfb\u4e3aforeach\u5faa\u73af\u800c\u4e0d\u662f\u51fd\u6570\u8c03\u7528\u7684\u5b8f\nForEachMacros: [&#039;RANGES_FOR&#039;, &#039;FOREACH&#039;]\nIfMacros: [&#039;IF&#039;]\n# \u591a\u4e2a#include\u5757\u5408\u5e76\u5728\u4e00\u8d77\u5e76\u6392\u5e8f\u4e3a\u4e00\u4e2a\nIncludeBlocks:   Merge\n# \u53ef\u4ee5\u5b9a\u4e49\u8d1f\u6570\u4f18\u5148\u7ea7\u4ece\u800c\u4fdd\u8bc1\u67d0\u4e9b#include\u6c38\u8fdc\u5728\u6700\u524d\u9762\nIncludeCategories:\n  - Regex:           &#039;^&quot;(llvm|llvm-c|clang|clang-c)\/&#039;\n    Priority:        2\n    SortPriority:    0\n    CaseSensitive:   false\n  - Regex:           &#039;^(&lt;|&quot;(gtest|gmock|isl|json)\/)&#039;\n    Priority:        3\n    SortPriority:    0\n    CaseSensitive:   false\n  - Regex:           &#039;.*&#039;\n    Priority:        1\n    SortPriority:    0\n    CaseSensitive:   false\nIncludeIsMainRegex: &#039;(Test)?$&#039;\nIncludeIsMainSourceRegex: &#039;&#039;\n# \u7f29\u8fdb\u8bbf\u95ee\u4fee\u9970\u7b26\nIndentAccessModifiers: false\n# \u7f29\u8fdbcase\u6807\u7b7e\nIndentCaseLabels: false\n# case \u6807\u7b7e\u540e\u9762\u7684\u5757\u4f7f\u7528\u4e0e case \u6807\u7b7e\u76f8\u540c\u7684\u7f29\u8fdb\u7ea7\u522b\nIndentCaseBlocks: false\n# \u5411\u540e\u517c\u5bb9\u7f29\u8fdb\u5916\u90e8\u5757\nIndentExternBlock: AfterExternBlock\n# \u7f29\u8fdbgoto\u6807\u7b7e\u3002\nIndentGotoLabels: false\n# \u7f29\u8fdb\u9884\u5904\u7406\u5668\u6307\u4ee4\nIndentPPDirectives: BeforeHash\n# \u7f29\u8fdb\u6a21\u677f\u4e2d\u7684requires\u5b50\u53e5\nIndentRequires:  false\n# \u7f29\u8fdb\u5bbd\u5ea6\nIndentWidth: 4\n# \u51fd\u6570\u8fd4\u56de\u7c7b\u578b\u6362\u884c\u65f6\uff0c\u7f29\u8fdb\u51fd\u6570\u58f0\u660e\u6216\u51fd\u6570\u5b9a\u4e49\u7684\u51fd\u6570\u540d\nIndentWrappedFunctionNames: false\n#InsertBraces: true\n# \u63d2\u5165\u5c3e\u968f\u9017\u53f7\nInsertTrailingCommas: None\n# \u4fdd\u7559JavaScript\u5b57\u7b26\u4e32\u5f15\u53f7\nJavaScriptQuotes: Leave\n# \u5305\u88c5 JavaScript \u5bfc\u5165\/\u5bfc\u51fa\u8bed\u53e5\nJavaScriptWrapImports: true\n# \u4fdd\u7559\u5728\u5757\u5f00\u59cb\u5904\u7684\u7a7a\u884c\nKeepEmptyLinesAtTheStartOfBlocks: false\n# \u76f8\u5bf9\u4e8e lambda \u7b7e\u540d\u5bf9\u9f50 lambda \u4e3b\u4f53\nLambdaBodyIndentation: Signature\n# \u5f00\u59cb\u4e00\u4e2a\u5757\u7684\u5b8f\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\nMacroBlockBegin: &#039;&#039;\n# \u7ed3\u675f\u4e00\u4e2a\u5757\u7684\u5b8f\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\nMacroBlockEnd:   &#039;&#039;\n# \u8fde\u7eed\u7a7a\u884c\u7684\u6700\u5927\u6570\u91cf\nMaxEmptyLinesToKeep: 1\n# \u547d\u540d\u7a7a\u95f4\u7684\u7f29\u8fdb\nNamespaceIndentation: All\nObjCBinPackProtocolList: Auto\n# \u4f7f\u7528ObjC\u5757\u65f6\u7f29\u8fdb\u5bbd\u5ea6\nObjCBlockIndentWidth: 4\nObjCBreakBeforeNestedBlockParam: true\n# \u5728ObjC\u7684@property\u540e\u6dfb\u52a0\u4e00\u4e2a\u7a7a\u683c\nObjCSpaceAfterProperty: false\n# \u5728ObjC\u7684protocol\u5217\u8868\u524d\u6dfb\u52a0\u4e00\u4e2a\u7a7a\u683c\nObjCSpaceBeforeProtocolList: true\n# \u7f29\u8fdb\u9884\u5904\u7406\u5668\u8bed\u53e5\u7684\u5217\u6570\nPPIndentWidth:   -1\nPenaltyBreakAssignment: 2\nPenaltyBreakBeforeFirstCallParameter: 19\nPenaltyBreakComment: 300\nPenaltyBreakFirstLessLess: 120\nPenaltyBreakString: 1000\nPenaltyBreakTemplateDeclaration: 10\nPenaltyExcessCharacter: 1000000\nPenaltyReturnTypeOnItsOwnLine: 60\nPenaltyIndentedWhitespace: 0\n# \u6307\u9488\u7684\u5bf9\u9f50: Left, Right, Middle\nPointerAlignment: Right\n# \u5f15\u7528\u7684\u5bf9\u9f50\nReferenceAlignment: Pointer\n# \u5141\u8bb8\u91cd\u65b0\u6392\u7248\u6ce8\u91ca\nReflowComments:  true\n#RemoveBracesLLVM: false\n# \u77ed\u547d\u540d\u7a7a\u95f4\u8de8\u8d8a\u7684\u6700\u5927\u5c55\u5f00\u884c\u6570\nShortNamespaceLines: 1\n# \u5141\u8bb8\u6392\u5e8f#include\nSortIncludes:    CaseSensitive\n# java\u9759\u6001\u5bfc\u5165\u653e\u5728\u975e\u9759\u6001\u5bfc\u5165\u4e4b\u524d\nSortJavaStaticImport: Before\n# \u5bf9using\u58f0\u660e\u6392\u5e8f\nSortUsingDeclarations: true\n# \u5728C\u98ce\u683c\u7c7b\u578b\u8f6c\u6362\u540e\u6dfb\u52a0\u7a7a\u683c\nSpaceAfterCStyleCast: false\n# \u5728!\u540e\u6dfb\u52a0\u7a7a\u683c\nSpaceAfterLogicalNot: false\n# \u5728Template\u5173\u952e\u5b57\u540e\u6dfb\u52a0\u7a7a\u683c\nSpaceAfterTemplateKeyword: true\n# \u4e0d\u8981\u786e\u4fdd\u6307\u9488\u9650\u5b9a\u7b26\u5468\u56f4\u6709\u7a7a\u683c\nSpaceAroundPointerQualifiers: Default\n# \u5728\u8d4b\u503c\u8fd0\u7b97\u7b26\u4e4b\u524d\u6dfb\u52a0\u7a7a\u683c\nSpaceBeforeAssignmentOperators: true\n# \u4e0d\u5728case\u5192\u53f7\u4e4b\u524d\u6dfb\u52a0\u7a7a\u683c\nSpaceBeforeCaseColon: false\n# \u4e0d\u5728C++11\u5927\u62ec\u53f7\u5217\u8868\u4e4b\u524d\u6dfb\u52a0\u7a7a\u683c\nSpaceBeforeCpp11BracedList: false\n# \u5728\u6784\u9020\u51fd\u6570\u521d\u59cb\u5316\u5668\u5192\u53f7\u4e4b\u524d\u6dfb\u52a0\u7a7a\u683c\nSpaceBeforeCtorInitializerColon: true\n# \u5728\u7ee7\u627f\u5192\u53f7\u524d\u6dfb\u52a0\u7a7a\u683c\nSpaceBeforeInheritanceColon: true\n# \u5f00\u5706\u62ec\u53f7\u4e4b\u524d\u6dfb\u52a0\u4e00\u4e2a\u7a7a\u683c\nSpaceBeforeParens: ControlStatements\n# \u5728\u57fa\u4e8e\u8303\u56f4\u7684for\u5faa\u73af\u5192\u53f7\u4e4b\u524d\u6dfb\u52a0\u7a7a\u683c\nSpaceBeforeRangeBasedForLoopColon: true\n# \u4e2d\u62ec\u53f7\u524d\u7a7a\u683c\nSpaceBeforeSquareBrackets: false\n# {}\u4e2d\u95f4\u7a7a\u683c\nSpaceInEmptyBlock: false\n# \u5728\u7a7a\u7684\u5706\u62ec\u53f7\u4e2d\u6dfb\u52a0\u7a7a\u683c\nSpaceInEmptyParentheses: false\n# \u5728\u5c3e\u968f\u7684\u8bc4\u8bba\u524d\u6dfb\u52a0\u7684\u7a7a\u683c\u6570(\u53ea\u9002\u7528\u4e8e\/\/)\nSpacesBeforeTrailingComments: 2\n# \u5728\u5c16\u62ec\u53f7\u7684&lt;\u540e\u548c&gt;\u524d\u6dfb\u52a0\u7a7a\u683c\nSpacesInAngles:  true\n# \u5728C\u98ce\u683c\u7c7b\u578b\u8f6c\u6362\u7684\u62ec\u53f7\u4e2d\u6dfb\u52a0\u7a7a\u683c\nSpacesInCStyleCastParentheses: false\n# \u4e0d\u5728if\/for\/switch\/while\u6761\u4ef6\u5468\u56f4\u63d2\u5165\u7a7a\u683c\nSpacesInConditionalStatement: false\n# \u5728\u5bb9\u5668(ObjC\u548cJavaScript\u7684\u6570\u7ec4\u548c\u5b57\u5178\u7b49)\u5b57\u9762\u91cf\u4e2d\u6dfb\u52a0\u7a7a\u683c\nSpacesInContainerLiterals: true\n# \u884c\u6ce8\u91ca\u5f00\u5934\u5141\u8bb8\u6709\u591a\u5c11\u4e2a\u7a7a\u683c\u3002\u8981\u7981\u7528\u6700\u5927\u503c\uff0c\u8bf7\u5c06\u5176\u8bbe\u7f6e\u4e3a-1\uff0c\u9664\u6b64\u4e4b\u5916\uff0c\u6700\u5927\u503c\u4f18\u5148\u4e8e\u6700\u5c0f\u503c\nSpacesInLineCommentPrefix:\n  Minimum:         1\n  Maximum:         -1\n# \u5728\u5706\u62ec\u53f7\u7684(\u540e\u548c)\u524d\u6dfb\u52a0\u7a7a\u683c\nSpacesInParentheses: false\n# \u5728\u65b9\u62ec\u53f7\u7684[\u540e\u548c]\u524d\u6dfb\u52a0\u7a7a\u683c\uff0clamda\u8868\u8fbe\u5f0f\u548c\u672a\u6307\u660e\u5927\u5c0f\u7684\u6570\u7ec4\u7684\u58f0\u660e\u4e0d\u53d7\u5f71\u54cd\nSpacesInSquareBrackets: false\n# \u6807\u51c6\nStandard:        Auto\n# \u5728\u8bed\u53e5\u524d\u9762\u88ab\u5ffd\u7565\u7684\u5b8f\u5b9a\u4e49\uff0c\u5c31\u597d\u50cf\u5b83\u4eec\u662f\u4e00\u4e2a\u5c5e\u6027\u4e00\u6837\nStatementAttributeLikeMacros:\n  - Q_EMIT\n# \u5e94\u8be5\u88ab\u89e3\u91ca\u4e3a\u5b8c\u6574\u8bed\u53e5\u7684\u5b8f\u5b9a\u4e49\nStatementMacros:\n  - Q_UNUSED\n  - QT_REQUIRE_VERSION\n# tab\u5bbd\u5ea6\nTabWidth:        4\n# \u4f7f\u7528\\r\\n\u6362\u884c\u66ff\u4ee3\\n\nUseCRLF:         false\n# \u4f7f\u7528tab\u5b57\u7b26\uff1aForIndentation\u2014\u2014\u4ec5\u5c06\u5236\u8868\u7b26\u7528\u4e8e\u7f29\u8fdb\nUseTab:          Never\n# \u5bf9\u7a7a\u683c\u654f\u611f\u7684\u5b8f\u5b9a\u4e49\nWhitespaceSensitiveMacros:\n  - STRINGIZE\n  - PP_STRINGIZE\n  - BOOST_PP_STRINGIZE\n  - NS_SWIFT_NAME\n  - CF_SWIFT_NAME\n...<\/code><\/pre>\n<p>\u73b0\u5728\u4f60\u4e00\u4fdd\u5b58\u6587\u4ef6\uff0clsp\u5c31\u4f1a\u6309\u7167\u4e0a\u8ff0<code>.clang-format<\/code>\u6587\u4ef6\u6765\u683c\u5f0f\u5316\u4f60\u7684\u4ee3\u7801\u3002<\/p>\n<h3>4. \u914d\u7f6eSublime<\/h3>\n<p>sublime\u4e3b\u8981\u6709\u4e24\u4e2a\u914d\u7f6e\u6587\u4ef6\uff0c\u4e00\u4e2a\u662f<code>Preferences-&gt;Settings<\/code>\u4e2d\uff0c\u4e00\u4e2a\u662f<code>Preferences-&gt;Key Bindings<\/code>\u3002<\/p>\n<p>\u8fdb\u5165\u4ee5\u540e\u5de6\u4fa7\u662f\u9ed8\u8ba4\u914d\u7f6e\uff0c\u65e0\u6cd5\u4fee\u6539\u7684\u3002\u53f3\u4fa7\u662f\u81ea\u5b9a\u4e49\u914d\u7f6e\uff0c\u81ea\u5b9a\u4e49\u914d\u7f6e\u53ef\u4ee5\u8986\u76d6\u9ed8\u8ba4\u914d\u7f6e\u9009\u9879\u3002<\/p>\n<h3>4.0 \u8bbe\u7f6eTab\u957f\u5ea6<\/h3>\n<p>\u6211\u559c\u6b22\u7528\u56db\u7a7a\u683c\u7684Tab\uff0c\u4e0d\u4f1a\u6709\u4eba\u7acb\u573a\u4e0d\u4e00\u6837\u5427\uff1f<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-bc5777ab526e3cee447b3413bd64f29a_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-28a89adaf827ff655477e5b4218eebc9_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<h3>4.1 sublime\u504f\u597d\u8bbe\u7f6e<\/h3>\n<p>OK\uff0c\u6211\u4eec\u5148\u6539<code>Preferences-&gt;Settings<\/code>\u3002\u8fd9\u662f\u6211\u7684\u4e2a\u4eba\u559c\u597d\uff1a<\/p>\n<pre><code class=\"lang-json\">{\n    &quot;font_size&quot;: 21,\n    &quot;ignored_packages&quot;: [\n        &quot;Vintage&quot;,\n    ],\n    \/\/ \u8bbe\u7f6etab\u7684\u5927\u5c0f\u4e3a4\n    &quot;tab_size&quot;: 4,\n    \/\/ \u4f7f\u7528\u7a7a\u683c\u4ee3\u66ff Tab\n    &quot;translate_tabs_to_spaces&quot;: true,\n    \/\/ \u4f7f\u7528\u9ed8\u8ba4\u5b57\u4f53 Monaco\n    &quot;font_face&quot;: &quot;Monaco&quot;,\n    \/\/ \u5931\u53bb\u5149\u6807\u81ea\u52a8\u4fdd\u5b58\n    &quot;save_on_focus_lost&quot;: true,\n    \/\/ \u6dfb\u52a0\u884c\u5bbd\u6807\u5c3a\n    &quot;rulers&quot;: [\n        100\n    ],\n    \/\/ \u663e\u793a\u7a7a\u767d\u5b57\u7b26\n    &quot;draw_white_space&quot;: &quot;all&quot;,\n    \/\/ \u4fdd\u5b58\u65f6\u81ea\u52a8\u53bb\u9664\u884c\u672b\u7a7a\u767d\n    &quot;trim_trailing_white_space_on_save&quot;: &quot;all&quot;,\n    \/\/ \u4fdd\u5b58\u65f6\u81ea\u52a8\u589e\u52a0\u6587\u4ef6\u672b\u5c3e\u6362\u884c\n    &quot;ensure_newline_at_eof_on_save&quot;: true,\n    \/\/ \u9ed8\u8ba4\u7f16\u7801\u683c\u5f0f\n    &quot;default_encoding&quot;: &quot;UTF-8&quot;,\n    \/\/ \u4e0d\u68c0\u67e5\u66f4\u65b0\n    &quot;update_check&quot;: false,\n    \/\/ \u628a\u5149\u6807\u7684\u6837\u5f0f\u4ece\u95ea\u70c1\u53d8\u6210\u6de1\u5165\u6de1\u51fa\n    \/\/ \u5176\u4f59\u7684\u9009\u9879\u8fd8\u6709&quot;smooth&quot;, &quot;phase&quot;, &quot;blink&quot;, &quot;wide&quot;\uff0c &quot;solid&quot;.\n    &quot;caret_style&quot;: &quot;phase&quot;,\n    \/\/ \u9ad8\u4eae\u5f53\u524d\u884c\n    &quot;highlight_line&quot;: true,\n    \/\/ \u589e\u52a0\u884c\u95f4\u8ddd\n    &quot;line_padding_bottom&quot;: 1,\n    &quot;line_padding_top&quot;: 1,\n    \/\/ \u4e00\u76f4\u663e\u793a\u4ee3\u7801\u6298\u53e0\u7bad\u5934\n    &quot;fade_fold_buttons&quot;: false,\n    \/\/ \u6392\u9664\u8fd9\u4e9b\u6587\u4ef6\u5939\uff0c\u641c\u7d22\u548c\u4fa7\u8fb9\u680f\u90fd\u4e0d\u4f1a\u663e\u793a\n    &quot;folder_exclude_patterns&quot;: [\n        &quot;*.dSYM&quot;,\n    ],\n    \/\/ \u6392\u9664\u8fd9\u4e9b\u6587\u4ef6\uff0c\u641c\u7d22\u548c\u4fa7\u8fb9\u680f\u90fd\u4e0d\u4f1a\u663e\u793a\n    &quot;file_exclude_patterns&quot;: [\n        &quot;.DS_Store&quot;,\n        &quot;.clang-format&quot;,\n        &quot;.clang-tidy&quot;,\n    ],\n}<\/code><\/pre>\n<h3>4.2 sublime\u5feb\u6377\u952e\u8bbe\u7f6e<\/h3>\n<p>\u8fd9\u6837\u914d\u7f6e\u4e0b\u6765\uff0c\u591a\u51fa\u6765\u4e86\u5f88\u591a\u529f\u80fd\u3002\u6211\u4eec\u53ef\u4ee5\u914d\u7f6e\u4e00\u4e9b\u5feb\u6377\u952e\uff0c\u4e0d\u5f97\u4e0d\u8bf4sublime\u7684\u5feb\u6377\u952e\u81ea\u5b9a\u4e49\u6027\u975e\u5e38\u5f3a\uff0c\u5c31\u662f\u6bd4\u8f83\u6298\u817e\u3002<\/p>\n<p>sublime\u7684\u5feb\u6377\u952e\u903b\u8f91\u662f\uff0c\u5f88\u591a\u63d2\u4ef6\u90fd\u6709key-bindings\u8bbe\u7f6e\uff08\u5982\u56fe\uff09<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-2ce2e859af7108d5ff5045b62b719295_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u6253\u5f00\u5c31\u80fd\u663e\u793a\u9ed8\u8ba4\u5feb\u6377\u952e\uff08\u5de6\u4fa7\uff09\u548c\u7cfb\u7edf\u5feb\u6377\u952e\uff08\u53f3\u4fa7\uff09\uff0c\u5728\u53f3\u4fa7\u53ef\u4ee5\u81ea\u5df1\u5199\u5feb\u6377\u952e\uff0c\u53ea\u8981<\/p>\n<p>\u6253\u5f00<code>Preferences-&gt;Key Bindings<\/code>\uff0c\u6211\u7684\u914d\u7f6e\u662f\uff1a<\/p>\n<pre><code class=\"lang-json\">[\n    \/\/ LSP Format File (lsp&#039;s format)\n    \/\/ &quot;shift+alt+l&quot;\u4e00\u952e\u683c\u5f0f\u5316\u5168\u6587\u4ef6\u6216\u8005\u9009\u4e2d\u533a\u57df\n    {\n        &quot;keys&quot;: [\n            &quot;shift+alt+l&quot;\n        ],\n        &quot;command&quot;: &quot;lsp_format_document&quot;,\n    },\n    \/\/ LSP Run Source Actions\n    \/\/ &quot;shift+alt+enter&quot; \u663e\u793a\u4ee3\u7801\u63d0\u793a\n    {\n        &quot;keys&quot;: [\n            &quot;shift+alt+enter&quot;\n        ],\n        &quot;command&quot;: &quot;lsp_code_actions&quot;,\n        &quot;context&quot;: [\n            {\n                &quot;key&quot;: &quot;lsp.session_with_capability&quot;,\n                &quot;operator&quot;: &quot;equal&quot;,\n                &quot;operand&quot;: &quot;codeActionProvider.codeActionKinds&quot;\n            }\n        ]\n    },\n    \/\/ LSP Goto Definition\n    \/\/ &quot;F12&quot;\u8f6c\u5230\u5b9a\u4e49\n    {\n        &quot;keys&quot;: [\n            &quot;f12&quot;\n        ],\n        &quot;command&quot;: &quot;lsp_symbol_definition&quot;,\n        &quot;args&quot;: {\n            &quot;side_by_side&quot;: false,\n            &quot;force_group&quot;: true,\n            &quot;fallback&quot;: false\n        },\n        &quot;context&quot;: [\n            {\n                &quot;key&quot;: &quot;lsp.session_with_capability&quot;,\n                &quot;operator&quot;: &quot;equal&quot;,\n                &quot;operand&quot;: &quot;definitionProvider&quot;\n            },\n            {\n                &quot;key&quot;: &quot;auto_complete_visible&quot;,\n                &quot;operator&quot;: &quot;equal&quot;,\n                &quot;operand&quot;: false\n            }\n        ]\n    },\n    \/\/ Terminus\n    \/\/ &quot;F2&quot;\u6253\u5f00\u6216\u5173\u95edTerminus\u9762\u677f\n    {\n        &quot;keys&quot;: [\n            &quot;f2&quot;\n        ],\n        &quot;command&quot;: &quot;toggle_terminus_panel&quot;,\n        &quot;args&quot;: {\n            &quot;cwd&quot;: &quot;${file_path:${folder}}&quot;\n        }\n    },\n]<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-85a042bd9c202d011f00c4d3f5b328ac_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u600e\u4e48\u603b\u611f\u89c9\u5c11\u4e86\u70b9\u4ec0\u4e48\uff1f\u662f\u6ca1\u6709\u8c03\u8bd5\u5de5\u5177\uff01<\/p>\n<h3>5. \u914d\u7f6eLLDB\u8c03\u8bd5<\/h3>\n<p>\u8fd9\u91cc\u5f97\u627f\u8ba4vscode\u7684\u8c03\u8bd5\u6bd4sublime\u5f3a\u5927\u5f97\u591a\uff0c<strong>\u5982\u679c\u6781\u5176\u4f9d\u8d56\u8c03\u8bd5\u7684\u8bdd\u5efa\u8bae\u8f6cVScode<\/strong>\u3002<\/p>\n<p>\u7531\u4e8e\u6211\u662f\u7528Clang\u7f16\u8bd1\u7684C++\u6587\u4ef6\uff0c\u6240\u4ee5\u7528 LLDB \u6765\u8c03\u8bd5\uff0c\u5f53\u7136\u5982\u679c\u4f60\u60f3\u7528 GCC \u7f16\u8bd1\uff0c\u53ef\u4ee5\u9009\u62e9GDB\u8c03\u8bd5\u3002<\/p>\n<p>\u6ce8\u610f\uff0c\u5982\u679c\u9009\u62e9GDB\u8c03\u8bd5\u7684\u8bdd\uff0c\u9700\u8981\u4e0b\u8f7dnodejs\u5e76\u4e14\u914d\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u8f83\u4e3a\u590d\u6742\u3002\u7531\u4e8e\u8fd9\u7bc7\u6587\u7ae0\u662f\u7ed9\u5c0f\u767d\u770b\u7684\uff0c\u6240\u4ee5\u53ea\u8981LLDB\u591f\u7528\u5c31\u4e0d\u591a\u52a0\u8d58\u8ff0\u3002\u6700\u540e<strong>\u5949\u529d\u5404\u4f4d\u51c6\u5907\u88c5nodejs\u7684\u5144\u5f1f\uff0c\u5148\u88c5NVM<\/strong>\uff08nodejs version manager\uff09\uff0c\u592a\u9999\u4e86\u3002<\/p>\n<h3>5.1 \u5b89\u88c5LLDB<\/h3>\n<p>\u6253\u5f00\u4e4b\u524d\u5b89\u88c5\u597d\u7684msys2\uff0c\u8f93\u5165\uff1a<\/p>\n<pre><code class=\"lang-bash\">pacman -S mingw64\/mingw-w64-x86_64-lldb<\/code><\/pre>\n<h3>5.2 \u6d4b\u8bd5LLDB\u662f\u5426\u5b89\u88c5\u6210\u529f<\/h3>\n<p>\u5728sublime\u91cc\u9762\u901a\u8fc7<code>F2<\/code>\u6253\u5f00\u7ec8\u7aef\uff08\u89c14.2\u7684\u5feb\u6377\u952e\u914d\u7f6e\uff09<\/p>\n<p>\u7136\u540e\u968f\u4fbf\u8c03\u8bd5\u4e00\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\uff08\u8fd9\u91cc\u9009\u7528test\uff09\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-d4bb39c07ec5435b8b555d351dc3c18c_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<pre><code>lldb ..\/bin\/test.exe\nC:\\Users\\hzy\\Downloads\\MyProject\\code&gt;lldb ..\/bin\/test.exe\n(lldb) target create &quot;..\/bin\/test.exe&quot;\nCurrent executable set to &#039;C:\\Users\\hzy\\Downloads\\MyProject\\bin\\test.exe&#039; (x86_64).\n(lldb) b 10\nBreakpoint 1: where = test.exe`main + 112 at test.cpp:10:12, address = 0x00000001400015f0\n(lldb) r\n(lldb) Process 4168 laun\\Users\\hzy\\Downloads\\MyProject\\bin\\test.exe&#039; (x86_64)\nProcess 4168 stopped\n* thread #1, stop reason = breakpoint 1.1\n    frame #0: 0x00007ff6642115f0 test.exe`main(argc=1, argv=0x0000025bcc901970) at test.cpp:10:12\n   7        std::queue&lt;int&gt; q;\n   8        q.push(100);\n   9        q.push(2);\n-&gt; 10       q.push(20);\n   11       a = 30;\n   12       q.push(a);\n   13       return 0;\n(lldb) p q\n(std::queue&lt;int, std::deque&lt;int, std::allocator&lt;int&gt; &gt; &gt;) $0 = {\n  c = size=2 {\n    [0] = 100\n    [1] = 2\n  }<\/code><\/pre>\n<p>\u5f53\u7136\uff0c\u60f3\u8981\u66f4\u6109\u5feb\u7684\u8c03\u8bd5\u7a0b\u5e8f\uff0c\u5c11\u4e0d\u4e86\u63d2\u4ef6\u7684\u534f\u52a9\u3002<\/p>\n<h3>5.2 \u5b89\u88c5debugger\u63d2\u4ef6<\/h3>\n<p>\u540c\u7406\uff0c\u6253\u5f00\u547d\u4ee4\u9762\u677f\uff0c\u8fdb\u5165package control install\u5b89\u88c5\u754c\u9762\uff0c\u8f93\u5165debugger\u56de\u8f66\uff0c\u7b49\u5f85\u5b89\u88c5\u5b8c\u6210\u3002<\/p>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u5728<code>Tools-&gt;debugger<\/code>\u4e2d\u6253\u5f00\u5b83\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-b7319ab45f8e73f2e8e82f74aaee8f6b_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u7531\u4e8e\u6211\u4eec\u8fd8\u6ca1\u6709\u5efa\u7acb\u9879\u76ee\uff0c\u5b83\u63d0\u793a\u6211\u4eec\u5efa\u7acbsublime project\uff0c\u70b9\u51fb\u5373\u53ef\u521b\u5efa<code>MyProject.sublime-project<\/code>\u548c<code>MyProject.sublime-workspace<\/code>\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-9d4c25c9a1b133bd6af17b23c806ad00_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u524d\u8005\u662f\u5bf9\u8be5\u9879\u76ee\u7684\u914d\u7f6e\uff08\u9879\u76ee\u5730\u5740\u7b49\u7b49\uff09\uff0c\u540e\u8005\u662f\u5bf9\u6587\u4ef6\u64cd\u4f5c\u7684\u8bb0\u5f55\u3001\u8bb0\u5f55\u6253\u5f00\u4e86\u54ea\u4e9b\u6587\u4ef6\u3001\u8bb0\u4f4f\u4ee3\u7801\u8865\u5168\u7684\u9009\u62e9\uff08\u4e00\u822c\u4e0d\u8fdb\u884c\u4fee\u6539\uff09\u3002<\/p>\n<p>\u5efa\u7acb\u9879\u76ee\u6587\u4ef6\u540e\uff0cdebugger\u5c31\u80fd\u8dd1\u8d77\u6765\u4e86\u3002\u8fd9\u65f6\u9009\u62e9<code>Add Config<\/code><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-af8d5aa4e8c22c15dee1b705173f5007_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u9009\u62e9<code>install adapters<\/code>\uff0c\u6211\u4eec\u8981\u5b89\u88c5lldb\u5bf9\u5e94\u7684\u9002\u914d\u5668\u3002\uff08\u26a0\ufe0f\u9700\u8981\u9b54\u6cd5\u4e0a\u7f51\uff09<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-d44e6545cbea66aa6df7fbd32657fcb3_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u9009\u62e9<code>lldb<\/code>\uff0c\u8fdb\u53bb\u540e\u9009\u62e9\u7b2c\u4e00\u4e2a\u3002\uff08\u26a0\ufe0f\u9700\u8981\u9b54\u6cd5\u4e0a\u7f51\uff09<br \/>x<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-27e5ff02f26a2198002a52a783cd8d03_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u5b89\u88c5\u5b8c\u6210\u3002\uff08\u26a0\ufe0f\u9700\u8981\u9b54\u6cd5\u4e0a\u7f51\uff09<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-0384a0e97440e07539623153e121258a_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u522b\u6025\uff0c\u8fd8\u6709\uff0c\u7ee7\u7eed\u70b9\u51fb<code>Add Config<\/code><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-af8d5aa4e8c22c15dee1b705173f5007_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u9009\u62e9<code>Add Configuration<\/code><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-591eb37bc53cbad9cf2c7ffb5ec9a688_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u9009\u62e9lldb\uff0c\u7136\u540e\u9009\u62e9\u7b2c\u4e00\u4e2a\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-3a6132c78f9b3b6ff2f74989d92044b3_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u8fd9\u4e00\u6b65\u5b9e\u9645\u4e0a\u53ea\u662f\u5230<code>.sublime-project<\/code>\u6587\u4ef6\u91cc\u9762\u63d2\u5165\u4e86\u4e00\u6bb5\u4ee3\u7801\u800c\u5df2\u3002\u5982\u679c\u663e\u793a\u63d2\u5165\u5931\u8d25\u7684\u8bdd\uff08Mac\u5c31\u662f\u8fd9\u6837\uff09\u4e0d\u7528\u7ba1\u5b83\uff0c\u53cd\u6b63\u8fd9\u6bb5\u4ee3\u7801\u8fdf\u65e9\u4e5f\u8981\u88ab\u7206\u6539\u4e00\u901a\u3002<\/p>\n<h3>5.3 \u914d\u7f6edebugger<\/h3>\n<p>\u6b64\u65f6\uff0c\u57fa\u672c\u7684LLDB\u914d\u7f6e\u90fd\u5b8c\u6210\u4e86\uff0c\u5982\u679c\u60f3\u7528GDB\u7684\u8bdd\uff08\u6216\u8005LLDB\u56e0\u4e3a\u83ab\u540d\u7684\u9519\u8bef\u7528\u4e0d\u4e86\u7684\u8bdd\uff09\uff0c\u53ef\u4ee5\u4ee5\u76f8\u540c\u7684\u539f\u7406\u5b89\u88c5GDB\u9002\u914d\u5668\u3002\u6211\u7684sublime-project\u91cc\u9762\u662f\u8fd9\u6837\u7684\uff1a<\/p>\n<pre><code class=\"lang-json\">{\n    &quot;folders&quot;: [\n        {\n            &quot;path&quot;: &quot;.&quot;,\n        }\n    ],\n    &quot;debugger_configurations&quot;: [\n        {\n            &quot;type&quot;: &quot;lldb&quot;,\n            &quot;request&quot;: &quot;launch&quot;,\n            &quot;name&quot;: &quot;Launch&quot;,\n            &quot;program&quot;: &quot;${folder}\/bin\/${file_base_name}&quot;,\n            &quot;args&quot;: [],\n            &quot;cwd&quot;: &quot;${folder}&quot;\n        },\n    ],\n}<\/code><\/pre>\n<p>\u52c9\u5f3a\u53ef\u4ee5\u7528\uff0c\u4f46\u662f\u66f4\u4f18\u7684\u914d\u7f6e\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"lang-json\">{\n    &quot;folders&quot;: [\n        {\n            &quot;path&quot;: &quot;.&quot;\n        },\n    ],\n    &quot;debugger_tasks&quot;: [\n        {\n            \/\/ \u7528Clang\u7f16\u8bd1\n            &quot;name&quot;: &quot;CompileWithClang&quot;,\n            &quot;working_dir&quot;: &quot;${file_path}&quot;,\n            &quot;shell_cmd&quot;: &quot;clang++ -std=c++11 -g &#039;${file}&#039; -o &#039;${file_path}\/..\/bin\/${file_base_name}&#039;&quot;,\n            &quot;file_regex&quot;: &quot;(..[^:]*):([0-9]+):([0-9]+)?:? error: (.*)&quot;,\n        },\n        {\n            \/\/ \u7528GCC\u7f16\u8bd1\n            &quot;name&quot;: &quot;CompileWithGCC&quot;,\n            &quot;working_dir&quot;: &quot;${file_path}&quot;,\n            &quot;shell_cmd&quot;: &quot;g++ -std=c++11 -g &#039;${file}&#039; -o &#039;${file_path}\/..\/bin\/${file_base_name}&#039;&quot;,\n            &quot;file_regex&quot;: &quot;(..[^:]*):([0-9]+):([0-9]+)?:? error: (.*)&quot;,\n        },\n    ],\n    &quot;debugger_configurations&quot;: [\n        {\n            \/\/ \u5728Terminus\u7a97\u53e3\u8fd0\u884c\u7a0b\u5e8f\uff0c\u4f7f\u7528GDB\u8c03\u8bd5\n            &quot;name&quot;: &quot;C++ GDB (Terminus)&quot;,\n            &quot;type&quot;: &quot;gdb&quot;,\n            &quot;request&quot;: &quot;launch&quot;,\n            \/\/ Debug\u4e4b\u524d\u5148\u7528GCC\u7f16\u8bd1\u4e00\u6ce2\n            &quot;pre_debug_task&quot;: &quot;CompileWithGCC&quot;,\n            \/\/ bin\u76ee\u5f55\u4e0b\u7684\u53ef\u6267\u884c\u6587\u4ef6\n            &quot;target&quot;: &quot;${file_path}\/..\/bin\/${file_base_name}&quot;,\n            &quot;cwd&quot;: &quot;${project_path}&quot;,\n            &quot;terminal&quot;: &quot;external&quot;,\n            &quot;valuesFormatting&quot;: &quot;parseText&quot;\n        },\n        {\n            &quot;name&quot;: &quot;C++ GDB (Attach)&quot;,\n            &quot;type&quot;: &quot;gdb&quot;,\n            &quot;request&quot;: &quot;attach&quot;,\n            &quot;target&quot;: &quot;${command_pick_process}&quot;, \/\/ sublime text 4 only\n            &quot;cwd&quot;: &quot;${folder}&quot;,\n            &quot;valuesFormatting&quot;: &quot;parseText&quot;\n        },\n        {\n            \/\/ \u5728Terminus\u7a97\u53e3\u8fd0\u884c\u7a0b\u5e8f\uff0c\u4f7f\u7528LLDB\u8c03\u8bd5\n            &quot;name&quot;: &quot;C++ LLDB (Terminus)&quot;,\n            &quot;type&quot;: &quot;lldb&quot;,\n            &quot;request&quot;: &quot;launch&quot;,\n            \/\/ Debug\u4e4b\u524d\u5148\u7528Clang\u7f16\u8bd1\u4e00\u6ce2\n            &quot;pre_debug_task&quot;: &quot;CompileWithClang&quot;,\n            \/\/ bin\u76ee\u5f55\u4e0b\u7684\u53ef\u6267\u884c\u6587\u4ef6\n            &quot;program&quot;: &quot;${file_path}\/..\/bin\/${file_base_name}&quot;,\n            &quot;cwd&quot;: &quot;${project_path}&quot;,\n            \/\/ \u4f7f\u7528\u5916\u90e8\u7ec8\u7aef\u8fd0\u884c\u7a0b\u5e8f\uff08\u9ed8\u8ba4\u662fTerminus\uff09\n            &quot;terminal&quot;: &quot;external&quot;,\n        },\n        {\n            &quot;name&quot;: &quot;C++ LLDB (Attach)&quot;,\n            &quot;type&quot;: &quot;lldb&quot;,\n            &quot;request&quot;: &quot;attach&quot;,\n            &quot;pid&quot;: &quot;${command_pick_process}&quot; \/\/ sublime text 4 only\n        },\n    ],\n}<\/code><\/pre>\n<p>OK\uff0c\u73b0\u5728\u518d\u6b21<code>Tools-&gt;debugger-&gt;Open<\/code>\uff08\u6216\u8005\u5728\u547d\u4ee4\u9762\u677f\u8f93\u5165<code>debugger open<\/code>\u4e5f\u53ef\u4ee5\uff09\uff0c\u70b9\u51fb\u8fd0\u884c<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-35b847a82cea1627ce0a1dddaa8bafd1_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u9009\u62e9C++ LLDB (Terminus)<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-2a8187dfd0d56f8883fdabc268d7f237_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u5c31\u80fd\u6109\u5feb\u5730\u8fdb\u884c\u8c03\u8bd5\u5566\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-9737e457cec5fa58ca9e347f8116fcdc_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<h3>6 \u4fee\u6539sublime\u7684\u914d\u7f6e\u6587\u4ef6\u4fdd\u5b58\u4f4d\u7f6e<\/h3>\n<p>Sublime Text 3\u5b89\u88c5\u5b8c\u4ee5\u540e\uff08\u5b89\u88c5\u8fc7\u7a0b\u4e0d\u518d\u6f14\u793a\uff09\uff0c\u7b2c\u4e00\u6b21\u6253\u5f00\u4f1a\u5728C:\\Users\\admin\\AppData\\Roaming\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2aSublime Text 3\u76ee\u5f55\u7528\u4e8e\u5b58\u653eSublime Text 3\u7684\u914d\u7f6e\u4fe1\u606f\u548c\u5b89\u88c5\u7684\u63d2\u4ef6\u7b49\u3002\u901a\u8fc7\u4e0b\u9762\u7684\u65b9\u5f0f\u5c31\u53ef\u4ee5\u5c06\u8fd9\u4e2a\u9ed8\u8ba4\u8def\u5f84\u4fee\u6539\u5230Sublime Text 3\u7684\u5b89\u88c5\u8def\u5f84\u4e0b\uff0c\u8fd9\u6837\u5c31\u53ef\u4ee5\u628aSublime Text 3 copy\u5230\u5176\u4ed6\u7535\u8111\u4e0a\u76f4\u63a5\u4f7f\u7528\u4e86\u3002<\/p>\n<p>\u5b89\u88c5\u5b8c\u4ee5\u540e\u5148\u4e0d\u8981\u6253\u5f00\uff0c\u5982\u679c\u5df2\u7ecf\u6253\u5f00\u5c31\u70b9\u51fb\u83dc\u5355\u680f\u7684Preferences--&gt;Browse Packages...\u5c31\u80fd\u627e\u5230\u5728C\u76d8\uff08\u7cfb\u7edf\u76d8\uff09\u521b\u5efa\u7684\u6587\u4ef6\u5939\uff08\u9ed8\u8ba4\u662f\u9690\u85cf\u7684\uff09\uff0c\u8fd4\u56de\u5230\u4e0a\u4e00\u7ea7\u7684Sublime Text 3\u6587\u4ef6\u5939\uff0c\u7136\u540e\u5173\u95ed\u8f6f\u4ef6\uff0c\u5220\u6389Sublime Text 3\u6587\u4ef6\u5939\u3002\u5728Sublime Text 3 \u7684\u5b89\u88c5\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2aData\u6587\u4ef6\u5939\uff08\u6ce8\u610f\u5927\u5c0f\u5199\uff09\uff0c\u7136\u540e\u6253\u5f00Sublime Text 3\u8f6f\u4ef6\u5c31\u884c\u4e86\u3002<\/p>\n<h2>4.\u63d2\u4ef6\u914d\u7f6e<\/h2>\n<h3>4.1\u5b89\u88c5Package Control<\/h3>\n<p>Package Control\u4e3a\u63d2\u4ef6\u7ba1\u7406\u5305\uff0c\u65b9\u4fbf\u6d4f\u89c8\u3001\u5b89\u88c5\u548c\u5378\u8f7dSublime Text\u4e2d\u7684\u63d2\u4ef6<\/p>\n<p>ctrl+`\uff0c\u5728\u4e0b\u9762\u5f39\u51fa\u7684\u63a7\u5236\u53f0\u4e2d\u52a0\u5165\u4ee5\u4e0b\u4ee3\u7801\u6216\u8005\u53bb\u5b98\u7f51\u7c98\uff0c\u6309\u4e0b\u56de\u8f66\uff08\u53ef\u80fd\u4f1a\u672a\u54cd\u5e94\uff0c\u8010\u5fc3\u7b49\u5f85\u4e00\u4e0b\uff09\uff0c\u5b89\u88c5\u5b8c\u6210\u540e\u91cd\u542f<\/p>\n<h3>4.2 \u4e0b\u8f7d\u63d2\u4ef6<\/h3>\n<p>ctrl+shitf+p\uff0c\u8f93\u5165install\uff0c\u70b9\u51fb\u7b2c\u4e00\u4e2a\uff0c\u7b49\u5f85\u4e00\u4e0b\uff0c\u5728\u5f39\u51fa\u7684\u6846\u4e2d\u8f93\u5165\u60f3\u8981\u7684\u63d2\u4ef6\u540d\u5b57\uff0c\u70b9\u51fb\uff0c\u5373\u53ef\u4e0b\u8f7d<\/p>\n<h2>5.\u63d2\u4ef6\u63a8\u8350<\/h2>\n<h3>5.1 ChineseLocalizations<\/h3>\n<p>\u529f\u80fd\uff1a\u66f4\u6539sublime\u7684\u8bed\u8a00\u3002<\/p>\n<p>\u4f7f\u7528\uff1a\u4e0b\u8f7d\u5b8c\u6210\u540e\u70b9\u51fb\u83dc\u5355\u680f\u4e2d\u7684Help\uff0c\u6700\u4e0b\u9762\u4f1a\u591a\u4e00\u4e2alanguage\uff0c\u5728\u91cc\u9762\u53ef\u4ee5\u9009\u62e9\u8bed\u8a00<\/p>\n<p>\u4e0b\u8f7d\u65f6\u5f39\u51fa\u7684\u6846\u91cc\u9762\u7684\uff08\u76f4\u63a5\u5173\u6389\u90a3\u4e2a\u6846\u5c31\u884c\uff09\uff1a<\/p>\n<p>\u8bf7\u4f7f\u7528\u4e3b\u83dc\u5355\u7684 \u5e2e\u52a9\/Language \u5b50\u83dc\u5355\u6765\u5207\u6362\u8bed\u8a00\u3002 \u76ee\u524d\u652f\u6301 \u7b80\u4f53\u4e2d\u6587 \u7e41\u4f53\u4e2d\u6587 \u65e5\u672c\u8a9e \u5fb7\u8bed \u6cd5\u8bed \u4fc4\u8bed\u7b49\u3002 \u8981\u6362\u56de\u82f1\u8bed\u4e0d\u9700\u8981\u5378\u8f7d\u672c\u63d2\u4ef6\uff0c\u8bf7\u76f4\u63a5\u4ece\u83dc\u5355\u5207\u6362\u82f1\u6587\u3002<\/p>\n<h3>5.2 Side bar<\/h3>\n<p>\u529f\u80fd\uff1a\u663e\u793a\u4fa7\u8fb9\u680f<\/p>\n<p>\u914d\u7f6e\uff1a\u4e0b\u8f7d\u597d\u540e\u4e0d\u9ed8\u8ba4\u663e\u793a\uff0c\u53ef\u5728\u89c6\u56fe-&gt;\u4fa7\u8fb9\u680f\u4e2d\u6253\u5f00\u663e\u793a\u5f00\u5173<\/p>\n<h3>5.3 ConvertToUTF8<\/h3>\n<p>\u529f\u80fd\uff1a\u89e3\u51b3\u4e2d\u6587\u4e71\u7801\uff0c\u8ba9\u6ce8\u91ca\u53ef\u770b<\/p>\n<p>\u4f7f\u7528\uff1a\u5b89\u88c5\u5b8c\u6210\u5373\u53ef<\/p>\n<h3>5.4 Sublime Text Trans<\/h3>\n<p>\u529f\u80fd\uff1a\u8bbe\u7f6e\u80cc\u666f\u900f\u660e\u5ea6<\/p>\n<p>\u4f7f\u7528\u65b9\u6cd5\uff1aCtrl+Shift+[1,2,3,4,5,6]<\/p>\n<h3>5.5Sublime Astyle Formatter<\/h3>\n<p>\u529f\u80fd\uff1a\u683c\u5f0f\u5316\u4ee3\u7801<\/p>\n<p>\u4f7f\u7528\u65b9\u6cd5\uff1actrl+Alt+F\u662f\u9ed8\u8ba4\u683c\u5f0f\u5316\u6574\u4e2a\u6587\u4ef6\uff0cctrl+K+F\u5373\u53ef\u683c\u5f0f\u5316\u9009\u4e2d\u533a\u57df<\/p>\n<h3>5.6.BracketHighlighter<\/h3>\n<p>\u529f\u80fd\uff1a\u62ec\u53f7\u5339\u914d\u9ad8\u4eae\u3002<\/p>\n<p>\u4f7f\u7528\uff1a\u4e0b\u8f7d\u5b8c\u6210\u5373\u53ef\u4f7f\u7528\uff0c\u9ed8\u8ba4\u662f\u767d\u8272\u7684\u3002<\/p>\n<p>\u914d\u7f6e\uff1a\u5c06\u62ec\u53f7\u5339\u914d\u4ece\u767d\u8272\u53d8\u6210\u5f69\u8272<\/p>\n<p>\u9996\u9009\u9879-&gt;Package Settings-&gt;BracketHighlighter-&gt;bracket settings; \u5c06\u5de6\u4fa7\u590d\u5236\uff0c\u7c98\u5230User\u4e2d\uff0c\u5c06\u539f\u5148\u5927\u6982685\u884c\u7684\u4ee3\u7801\u66f4\u6539<\/p>\n<p>\u7136\u540e\u4fdd\u5b58\u9000\u51fa\u5c31\u884c\u3002<\/p>\n<h2>6.\u63d2\u4ef6\u7ba1\u7406\u4e0e\u5378\u8f7d<\/h2>\n<p>\u5f53\u7136\u4f60\u53ef\u4ee5\u6253\u5f00\u6587\u4ef6\u5939\u66b4\u529b\u5220\u9664<\/p>\n<h3>6.1 \u67e5\u770b\u5df2\u4e0b\u8f7d\u63d2\u4ef6<\/h3>\n<p>Ctrl+Shift+P\uff0c\u5728\u5bf9\u8bdd\u6846\u4e2d\u8f93\u5165\u201clist\u201d\uff0c\u9009\u62e9\u201cPackage Control:List Packages\u201d\u3002<\/p>\n<p>\u7136\u540e\u5c31\u53ef\u4ee5\u6d4f\u89c8\u548c\u67e5\u627e\u5df2\u5b89\u88c5\u63d2\u4ef6<\/p>\n<h3>6.2 \u5378\u8f7d\u63d2\u4ef6<\/h3>\n<p>Ctrl+Shift+P\uff0c\u5728\u5bf9\u8bdd\u6846\u4e2d\u8f93\u5165\u201cremove\u201d\uff0c\u9009\u62e9\u201cPackage Control:Remove Packages\u201d\u3002<\/p>\n<p>\u7136\u540e\u70b9\u51fb\u8981\u5378\u8f7d\u7684\u63d2\u4ef6\u5373\u53ef\u56fe\u548clist\u91cc\u7684\u5dee\u4e0d\u591a\uff0c\u5c31\u4e0d\u914d\u4e86 \u4f5c\u8005<\/p>\n<h2>7. sublime\u7f8e\u5316<\/h2>\n<h3>7.1 \u7f8e\u5316debugger<\/h3>\n<p>\u6211\u89c9\u5f97debugger\u7684\u9ed8\u8ba4\u5b57\u4f53\u592a\u4e11\u4e86\uff0c\u800c\u4e14\u754c\u9762\u5143\u7d20\u592a\u5927\u4e86\uff0c\u4e0d\u7b26\u5408sublime\u7684UI\u98ce\u683c\u3002<\/p>\n<p>\u6240\u4ee5\u6211\u8bd5\u7740\u628a\u5b83\u6539\u4e3asublime\u7684\u9ed8\u8ba4\u5b57\u4f53\uff08\u9700\u8981\u5b89\u88c5Monaco\u5b57\u4f53\uff09\uff0cUI\u5927\u5c0f\u6539\u5c0f\u3002<\/p>\n<p>Monaco\u5b57\u4f53\u7684<a href=\"http:\/\/www.mycode.net.cn\/wp-content\/uploads\/2016\/06\/Monaco.zip\">\u4e0b\u8f7d\u94fe\u63a5<\/a><\/p>\n<p>\u89e3\u538b\u4ee5\u540e\u53cc\u51fbMonaco<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-09eda66f529d1e9c5990e72b175ccf39_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u70b9\u51fbinstall\u5c31\u884c\u4e86<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-4dfff155d1934153a561e392403de630_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u7136\u540e\u5728\u547d\u4ee4\u9762\u677f\u8f93\u5165<code>debugger settings<\/code>\uff0c\u8fdb\u5165debugger\u8bbe\u7f6e\u754c\u9762\u3002\u9ecf\u8d34\u5982\u4e0b\u8bbe\u7f6e\uff1a<\/p>\n<pre><code class=\"lang-json\">{\n    \/\/ \u5f00sublime\u4e0d\u81ea\u52a8\u542f\u52a8debugger\n    &quot;open_at_startup&quot;: false,\n    \/\/ \u8bbe\u7f6e\u4e3asublime\u7684\u9ed8\u8ba4\u5b57\u4f53\n    &quot;font_face&quot;: &quot;Monaco&quot;,\n    \/\/ \u5b57\u4f53\u6539\u5c0f\u4e00\u4e9b\n    &quot;ui_scale&quot;: 14,\n    \/\/ \u81ea\u52a8\u51b3\u5b9a\u662f\u5426\u663e\u793a\u6c47\u7f16\u4ee3\u7801\n    &quot;lldb_show_disassembly&quot;: &quot;auto&quot;,\n    &quot;integrated_output_panels&quot;: {\n        &quot;integrated_output_panels&quot;: {\n            &quot;diagnostics&quot;: {\n                &quot;name&quot;: &quot;Diagnostics&quot;,\n            },\/\/ \u4ee3\u7801\u8bca\u65ad\u5e76\u5165debugger\u754c\u9762\n            &quot;Terminus&quot;: {\n                &quot;name&quot;: &quot;Terminal&quot;,\n                &quot;position&quot;: &quot;bottom&quot;\n            }\/\/ Terminus\u7ec8\u7aef\u5e76\u5165debugger\u754c\u9762\n        }\n    }\n}<\/code><\/pre>\n<p>\u6700\u7ec8\u6548\u679c\u56fe\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-64c76ccb529ab77b8a1fde126e417b1b_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<h3>7.2 \u7f8e\u5316UI<\/h3>\n<p>\uff08\u89c9\u5f97sublime\u7684UI\u5df2\u7ecf\u591f\u597d\u770b\u7684\u53ef\u4ee5\u8df3\u8fc7\uff09<\/p>\n<p>\u6700\u8fd1 Material UI \u6bd4\u8f83\u706b\u3002\u8fd8\u597dsublime\u4e5f\u6709\u4e2amaterial UI\u63d2\u4ef6\u3002<\/p>\n<p>\u540c\u4e0a\uff0cpackage control install\u8f93\u5165material theme<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-3a08fe904e37d6b5ab6589a7238bbc28_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u5b83\u4f1a\u63d0\u793a\u5b89\u88c5\u56fe\u6807\u63d2\u4ef6\uff0c\u7528\u6765\u5728\u4fa7\u8fb9\u680f\u663e\u793a\u5404\u79cd\u6587\u4ef6\u7c7b\u578b\u3002\u5b89\u88c5\u5c31\u5b8c\u4e8b\u4e86\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-1e80d26914ad53f3a3e888d3377dc51f_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u6700\u540e\uff0c\u5728\u547d\u4ee4\u9762\u677f\u8f93\u5165<code>material theme activate<\/code><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-d399286198523a49f5c3a1e8e8c2e0cb_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u6211\u9009\u7684\u662fMaterial-Theme Darker<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-2419a21a7c25c6c372eef9553acb755e_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u518d\u5728\u547d\u4ee4\u9762\u677f\u8f93\u5165<code>UI-Select Color Theme<\/code><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-fabeeb49d36db4fb82a06ff894fa7020_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u6211\u9009\u7684\u662fMaterial Theme<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-007330ef41f97d98474e2d7aab7b9e07_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<p>\u8fd9\u65f6\uff0c\u6211\u4eec\u53ef\u4ee5\u53d1\u73b0sublime\u7684\u8bbe\u7f6e\u4e2d\u591a\u4e86\u4e24\u884c\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-770880c8916bdd791d716f1759c28988_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<h2>8. sublime\u600e\u4e48\u7528\uff1f<\/h2>\n<p>\u901a\u8fc7\u4e0a\u9762\u7684\u4ecb\u7ecd\uff0c\u4f60\u53ef\u4ee5\u53d1\u73b0\uff0c\u51e0\u4e4e\u6240\u6709sublime\u7684\u9009\u9879\u548c\u63d2\u4ef6\u8bbe\u7f6e\u90fd\u53ef\u4ee5\u5728<strong>\u547d\u4ee4\u9762\u677f<\/strong>\u4e2d\u627e\u5230\uff0c\u6253\u5f00\u547d\u4ee4\u9762\u677f\u7684\u5feb\u6377\u952e\u662f<code>Ctrl+Shift+P<\/code>\u3002<\/p>\n<p>\u6b64\u5916\uff0csublime\u7684\u63d2\u4ef6\u914d\u7f6e\u90fd\u662f\u4ee3\u7801\u5316\u7684\uff0c\u4f60\u53ef\u4ee5\u5728\u5de6\u4fa7\u770b\u5230\u6240\u6709\u7684\u9009\u9879\u548c\u6ce8\u91ca\uff08\u5f53\u7136\u9700\u8981\u82f1\u6587\u597d\uff09\uff0c\u5728\u53f3\u4fa7\u5bf9\u9ed8\u8ba4\u8bbe\u7f6e\u8fdb\u884c\u4fee\u6539\u3002<\/p>\n<p>\u4e0b\u9762\u4ecb\u7ecd\u4e00\u4e9b\u975e\u5e38\u5b9e\u7528\u7684\u5feb\u6377\u952e\uff1a<\/p>\n<p>\u53ef\u4ee5\u901a\u8fc7<code>Ctrl+~<\/code>\u6253\u5f00sublime\u7684\u63a7\u5236\u53f0\uff0c\u4e00\u4e9b\u62a5\u9519\u90fd\u53ef\u4ee5\u5728\u4e0a\u9762\u627e\u5230\u5e76\u89e3\u51b3\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/amarantos.oss-cn-hangzhou.aliyuncs.com\/typecho\/2023\/03\/31\/picture\/v2-ac87e8645f52d1223cef455a92b932fc_1440w.webp\" alt=\"img\" title=\"img\"><\/p>\n<ol>\n<li><strong>\u5148\u6309<code>Ctrl K<\/code>\u518d\u6309<code>Ctrl B<\/code>\u53ef\u4ee5\u6253\u5f00\/\u5173\u95ed\u4fa7\u8fb9\u680f<\/strong><\/li>\n<li><code>Ctrl+P<\/code> \u641c\u7d22\u6846<\/li>\n<li><code>Ctrl+G<\/code> \u8df3\u8f6c\u5230\u7b2c\u51e0\u884c<\/li>\n<li><code>Ctrl+W<\/code> \u5173\u95ed\u5f53\u524d\u6253\u5f00\u6587\u4ef6<\/li>\n<li><code>Ctrl+Shift+W<\/code> \u5173\u95ed\u6240\u6709\u6253\u5f00\u6587\u4ef6<\/li>\n<li><code>Ctrl+Shift+V<\/code> \u7c98\u8d34\u5e76\u683c\u5f0f\u5316<\/li>\n<li><code>Ctrl+D<\/code> \u9009\u62e9\u5355\u8bcd\uff0c\u91cd\u590d\u53ef\u589e\u52a0\u9009\u62e9\u4e0b\u4e00\u4e2a\u76f8\u540c\u7684\u5355\u8bcd<\/li>\n<li><code>Ctrl+Shift+D<\/code> \u590d\u5236\u5149\u6807\u6240\u5728\u6574\u884c\uff0c\u63d2\u5165\u5230\u4e0b\u4e00\u884c<\/li>\n<li><code>Ctrl+L<\/code> \u9009\u62e9\u884c\uff0c\u91cd\u590d\u53ef\u4f9d\u6b21\u589e\u52a0\u9009\u62e9\u4e0b\u4e00\u884c<\/li>\n<li><code>Ctrl+Shift+L<\/code> \u9009\u62e9\u591a\u884c<\/li>\n<li><code>Ctrl+Shift+Enter<\/code> \u5728\u5f53\u524d\u884c\u524d\u63d2\u5165\u65b0\u884c<\/li>\n<li><code>Ctrl+X<\/code> \u5220\u9664\u5f53\u524d\u884c<\/li>\n<li><code>Ctrl+M<\/code> \u8df3\u8f6c\u5230\u5bf9\u5e94\u62ec\u53f7<\/li>\n<li><code>Alt+\u9f20\u6807\u62d6\u52a8<\/code> \u591a\u5149\u6807\u9009\u62e9<\/li>\n<li><code>Ctrl+J<\/code> \u9009\u62e9\u6807\u7b7e\u5185\u5bb9<\/li>\n<li><code>Ctrl+F<\/code> \u67e5\u627e\u5185\u5bb9<\/li>\n<li><code>Ctrl+N<\/code> \u65b0\u5efa\u7a97\u53e3<\/li>\n<li><code>Ctrl+\/<\/code> \u6ce8\u91ca<\/li>\n<li><code>Ctrl+Shift+K<\/code> \u5220\u9664\u6574\u884c<\/li>\n<li><code>Tab<\/code> \u5411\u53f3\u7f29\u8fdb<\/li>\n<li><code>Shift+Tab<\/code> \u5411\u5de6\u7f29\u8fdb<\/li>\n<li><code>Ctrl+Z<\/code> \u64a4\u9500<\/li>\n<li><code>Ctrl+Y<\/code> \u6062\u590d\u64a4\u9500<\/li>\n<li><code>F6<\/code> \u5355\u8bcd\u68c0\u6d4b\u62fc\u5199<\/li>\n<li><code>Ctrl+P<\/code> \u6253\u5f00\u641c\u7d22\u6846<\/li>\n<li><code>Ctrl+Tab<\/code> \u6309\u6587\u4ef6\u6d4f\u89c8\u8fc7\u7684\u987a\u5e8f\uff0c\u5207\u6362\u5f53\u524d\u7a97\u53e3\u7684\u6807\u7b7e\u9875\u3002<\/li>\n<\/ol>\n<ul>\n<li>\u8f93\u5165\u5f53\u524d\u9879\u76ee\u4e2d\u7684\u6587\u4ef6\u540d\uff0c\u5feb\u901f\u641c\u7d22\u6587\u4ef6<\/li>\n<li>\u8f93\u5165<code>@<\/code>\u548c\u5173\u952e\u5b57\uff0c\u67e5\u627e\u6587\u4ef6\u4e2d\u51fd\u6570\u540d<\/li>\n<li>\u8f93\u5165<code>:<\/code>\u548c\u6570\u5b57\uff0c\u8df3\u8f6c\u5230\u6587\u4ef6\u4e2d\u8be5\u884c\u4ee3\u7801<\/li>\n<li>\u8f93\u5165<code>#<\/code>\u548c\u5173\u952e\u5b57\uff0c\u67e5\u627e\u53d8\u91cf\u540d<\/li>\n<\/ul>\n<h2>9. \u5173\u95ed\u6fc0\u6d3b\u5f39\u7a97<\/h2>\n<p>1 \u5728\u8f6f\u4ef6\u7684\u5b89\u88c5\u76ee\u5f55\u627e\u5230 sublime_text.exe \u6587\u4ef6\u3002<\/p>\n<p>2 \u8fd9\u91cc\u63a8\u8350\u4f7f\u7528\uff1a \u3010hexed\u3011 \u5728\u7ebf\u5341\u516d\u8fdb\u5236\u7f16\u8f91\u5668\uff0c\u6253\u5f00 sublime_text.exe \u6587\u4ef6\u3002<a href=\"https:\/\/hexed.it\/\">hexed\u5728\u7ebf\u7f51\u7ad9<\/a><\/p>\n<p>3 \u7136\u540e\u67e5\u627e\u4ee5\u4e0b\u5b57\u8282\u5e76\u4e14\u66ff\u6362\uff08\u4e0d\u540c\u7684\u8f6f\u4ef6\u7248\u672c\u66ff\u6362\u7684\u5185\u5bb9\u7565\u6709\u4e0d\u540c\uff0c\u4e00\u5b9a\u8981\u770b\u597d\u8f6f\u4ef6\u7248\u672c\uff09<\/p>\n<blockquote><p>\u7248\u672c\uff1a80 78 05 00 0F 94 C1 \u66ff\u6362\u4e3a  C6 40 05 01 48 85 C9<\/p><\/blockquote>\n<h2>10.\u5f15\u7528\u94fe\u63a5,\u611f\u8c22\u539f\u4f5c\u8005\u7684\u4ed8\u51fa<\/h2>\n<blockquote>\n<p><a href=\"https:\/\/zhuanlan.zhihu.com\/p\/586687010\">https:\/\/zhuanlan.zhihu.com\/p\/586687010<\/a><\/p>\n<p><a href=\"https:\/\/www.cnblogs.com\/nangch\/p\/5341067.html\">https:\/\/www.cnblogs.com\/nangch\/p\/5341067.html<\/a><\/p>\n<p><a href=\"https:\/\/www.bilibili.com\/read\/cv12390518\">https:\/\/www.bilibili.com\/read\/cv12390518<\/a><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>1. \u5b89\u88c5sublime text \u8fdb\u5165sublime\u5b98\u7f51\u4e0b\u8f7dsublime\u7684\u5b89\u88c5\u5305\uff08\u5f53\u7136\u4e5f\u53ef\u4ee5\u5728\u5b98\u7f51\u4e0b\u8f7d\u9875\u9762\u4e0b\u8f7dportable\u7248\u672c\uff0c\u4e0d\u8fc7\u5efa\u8bae\u4e0b\u8f7d\u9ed8\u8ba4\u7684setup\u7248\u672c\uff09 \u53cc\u51fb\u5b89\u88c5\u5305\uff1a \u5e94\u8be5\u4e00\u4f1a\u5c31\u4e0b\u8f7d\u5b8c\u6210\u4e86\u3002 \u6b64\u65f6\u53ef\u4ee5\u5728\u5e94\u7528\u5217\u8868\u770b\u5230sublime\uff1a 2. \u4e0b\u8f7dLLVM\u548cClang \u53c2\u8003 https:\/\/www.cnblogs.com\/FrankOu\/p\/14215850.html \u73b0\u5728\u4f7f\u7528Clang\u7f16\u8bd1\u662f\u5927\u8d8b\u52bf\uff0c\u6240\u4ee5\u6211\u4eec\u8fd9\u91cc\u5c31\u4e0d\u4f7f\u7528gcc\u4e86\uff08\u867d\u7136\u5728\u4e0b\u8f7dClang\u7684\u8fc7\u7a0b\u4e2d\u4e5f\u4f1a\u5b89\u88c5gcc\uff09 Windows\u4e0b\u76f4\u63a5\u5b89\u88c5LLVM\u4f1a\u51fa\u73b0C++\u6807\u51c6\u5e93\u4e22\u5931\u7684\u95ee\u9898\uff0c\u6240\u4ee5\u6211\u4eec\u9700\u8981\u7528\u5230MSYS2\u8fd9\u4e2a\u5b89\u88c5\u5de5\u5177\uff0c\u539f\u7406\u5c31\u662f\u76f4\u63a5\u5b89\u88c5\u522b\u4eba\u7f16\u8bd1\u597d\u7684Clang\uff0c\u5f88\u65b9\u4fbf\u3002 2.1 \u4e0b\u8f7dmsys2\u5e76\u914d\u7f6e 2.1.1 msys2\u7684\u4e0b\u8f7d \u5728MSYS\u5b98\u7f51\u4e0b\u8f7dmsys2\uff0c\u5982\u679c\u662fwindows 64\u4f4d\uff0c\u5c31\u9009\u62e9 msys2-x86_64.exe 2.1.2 msys2\u7684\u5b89\u88c5 msys2\u9ed8\u8ba4\u5b89\u88c5\u5728C:\\msys64\uff0c\u5728\u8fd9\u91cc\u6211\u81ea\u5df1\u4e0d\u505a\u4fee\u6539\uff0c\u5b89\u88c5\u8def\u5f84\u8bfb\u8005\u53ef\u81ea\u884c\u51b3\u5b9a\u3002 \u540e\u9762\u53ea\u8981\u4e00\u76f4\u70b9next\u5c31\u884c\u4e86\u3002 \u5b89\u88c5\u5b8c\u6bd5\u7684\u754c\u9762\u5982\u4e0b 2.1.3 msys2\u7684\u914d\u7f6e \u6253\u5f00C:\\msys64\\etc\\pacman.d\u53ef\u4ee5\u770b\u5230mirrorlist.mingw32\u3001mirrorlist.mingw64\u3001mirrorlist.msys\u4e09\u4e2a\u6587\u4ef6\u3002 \u5728\u6587\u4ef6mirrorlist.mingw32\u4e2d\u52a0\u5165\uff1a Server = https:\/\/mirrors.tuna.tsinghua.edu.cn\/msys2\/mingw\/i686 \u5728\u6587\u4ef6mirrorlist.mingw64\u4e2d\u52a0\u5165\uff1a Server = https:\/\/mirrors.tuna.tsinghua.edu.cn\/msys2\/mingw\/x86_64 \u5728\u6587\u4ef6mirrorlist.msys\u4e2d\u52a0\u5165\uff1a Server = https:\/\/mirrors.tuna.tsinghua.edu.cn\/msys2\/msys\/$arch \u8fd9\u4e09\u884c\u662f\u4ece\u6e05\u534e\u955c\u50cf\u4e0b\u8f7d\u8f6f\u4ef6\uff0c\u901f\u5ea6\u4f1a\u5feb\u5f88\u591a\u3002\u968f\u540e\u6253\u5f00msys2\uff0c\u8f93\u5165pacman -Sy\u540c\u6b65\u8f6f\u4ef6\u5305\u6570\u636e\u5e93\u3002 \u7136\u540e\u518d\u8f93\u5165pacman -Su\u66f4\u65b0\u8f6f\u4ef6\u5305\u3002 \u5728\u6b64\u671f\u95f4msys2\u63d0\u793a\u4f60\u8f93\u5165y\u4e4b\u540e\u4f1a\u5173\u95ed\uff0c\u91cd\u65b0\u6253\u5f00\u518d\u8f93\u5165\u4e00\u904dpacman -Su\u5373\u53ef\u3002 2.2 \u5b89\u88c5\u5e76\u914d\u7f6eClang 2.2.1 \u5b89\u88c5Clang\u548cLLVM \u6253\u5f00msys2\uff0c\u8f93\u5165\uff1a pacman -S mingw64\/mingw-w64-x86_64-make mingw64\/mingw-w64-x86_64-gdb [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[47],"tags":[48],"class_list":["post-114","post","type-post","status-publish","format-standard","hentry","category-sublime","tag-sublime"],"_links":{"self":[{"href":"https:\/\/solost.cn\/index.php?rest_route=\/wp\/v2\/posts\/114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/solost.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/solost.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/solost.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/solost.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=114"}],"version-history":[{"count":0,"href":"https:\/\/solost.cn\/index.php?rest_route=\/wp\/v2\/posts\/114\/revisions"}],"wp:attachment":[{"href":"https:\/\/solost.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/solost.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/solost.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}