{"id":25152,"date":"2022-11-13T09:06:43","date_gmt":"2022-11-13T01:06:43","guid":{"rendered":"http:\/\/gulass.cn\/?p=25152"},"modified":"2022-11-13T09:07:40","modified_gmt":"2022-11-13T01:07:40","slug":"tools-vim-brain","status":"publish","type":"post","link":"https:\/\/gulass.cn\/tools-vim-brain.html","title":{"rendered":"\u4e0d\u6562\u60f3\u8c61\uff01Vim\u4f7f\u7528\u8005\u7684\u201c\u5927\u8111\u201d\u7adf\u662f\u8fd9\u6837"},"content":{"rendered":"
<\/p>\n
\u6211\u66fe\u7ecf\u89c2\u770b\u8fc7\u5c0f\u63d0\u7434\u5bb6\u975e\u5e38\u6709\u6fc0\u60c5\u5730\u62c9\u5f26\u6f14\u594f\uff0c\u6211\u6709\u4e86\u8fd9\u79cd\u60f3\u6cd5\uff1a\u4e5f\u8bb8\u6211\u6295\u5165\u5230\u6587\u672c\u7f16\u8f91\u5668\u4e2d\u7684\u8111\u7ec6\u80de\u6570\u91cf\u548c\u4ed6\u4e3a\u6295\u5165\u6240\u559c\u597d\u7684\u4e50\u5668\u7684\u6f14\u594f\u4e2d\u5dee\u4e0d\u591a\u5427\u3002\u6211\u8fd8\u6709\u79cd\u5947\u5f02\u7684\u60f3\u8c61\uff0c\u5f53\u4ed6\u72ec\u594f\u7684\u65f6\u5019\uff0c\u8111\u4e2d\u7684\u6838\u78c1\u5171\u632f\u56fe\u548c\u6211\u5728\u4f7f\u7528 Vim \u4e2d\u64cd\u63a7\u4ee3\u7801\u7684\u7684\u56fe\u50cf\u4e5f\u8bb8\u4e0d\u4f1a\u76f8\u5dee\u592a\u5927\u5427?<\/p>\n
<\/p>\n
\u5982\u679c\u4f60\u613f\u610f\u7684\u8bdd\u8bf7\u4f60\u4ed4\u7ec6\u601d\u8003\u4e0b\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e2a Vimmer \u7684\u5b66\u4e60\u65c5\u7a0b\u7684\u526a\u8f91\u3002<\/p>\n
\u201cEclipse \u5f53\u7136\u662f\u7b80\u6d01\u5b9e\u7528\u7684\u3002\u201d<\/p>\n
\u201c\u4f46\u662f\u4e00\u4e9b\u6ee1\u8138\u843d\u816e\u80e1\u7684\u5947\u602a\u5bb6\u4f19\u5728\u5de5\u4f5c\u4e2d\u4f3c\u4e4e\u4f7f\u7528 vim \u786e\u5b9e\u975e\u5e38\u5feb\uff0c\u6211\u5e94\u8be5\u8bd5\u4e00\u4e0b\u3002\u201d<\/p>\n
\u201c\u597d\u5427!\u6211\u5f04\u4e86\u4e2a Gvim\uff0c\u8fd9\u770b\u8d77\u6765\u4e0d\u662f\u5f88\u7cdf\u7cd5\uff0c\u8fd9\u91cc\u751a\u81f3\u8fd8\u6709\u83dc\u5355\u754c\u9762!\u201d<\/p>\n
\u201c\u7b49\u7b49\uff0c\u4ec0\u4e48?\u6211\u7684\u6587\u672c\u53bb\u54ea\u4e86?\u7b49\u4e00\u4e0b\uff0c\u64a4\u9500\uff0c\u4e0d\u8981\u554a!\u201d<\/p>\n
\u201c:help\u201d<\/p>\n
\u201c:q!!!!!\u201d<\/p>\n
\u2026\u2026<\/p>\n
\u4eca\u5929\u5269\u4e0b\u7684\u65f6\u95f4\u8fd8\u662f\u56de\u5230\u62e5\u6709\u8ba9\u4eba\u4e0a\u763e\u7684\u81ea\u52a8\u8865\u5168\u6837\u677f\u529f\u80fd\u7684 Eclipse \u4e2d\u83b7\u5f97\u89e3\u8131\u5427\u3002<\/p>\n
\u201c\u597d\u5427 Vim\uff0c\u8fd9\u662f\u65b0\u7684\u4e00\u5929\u4e86\uff0c\u8fd9\u662f\u4e2a\u78e8\u783a\u81ea\u5df1\u5b66\u4e60\u65b0\u4e1c\u897f\u7684\u4e00\u4e2a\u5d2d\u65b0\u7684\u673a\u4f1a\uff0c\u6211\u4e0d\u662f\u90a3\u4e48\u5bb9\u6613\u653e\u5f03\u7684\u4eba!\u201d<\/p>\n
\u201c\u4e3a\u4ec0\u4e48\u6211\u5c31\u4e0d\u80fd\u4e00\u76f4\u5446\u5728\u63d2\u5165\u6a21\u5f0f\u91cc\u9762\u5462?FJDSAKLFJDALSKJKLDF(\u53d1\u72c2\u7684\u6572\u51fb\u952e\u76d8)\u2026\u2026\u201d<\/p>\n
\u201c\u7b49\u4e00\u4e0b\uff0c\u4f60\u5728\u544a\u8bc9\u6211\u4fdd\u5b58\u7684\u65f6\u5019\u5fc5\u987b\u6309 Esc-Shift-:-w-Enter?\u8fd9\u7b80\u76f4\u5c31\u662f\u72d7\u5c41\u554a\u3002\u201d<\/p>\n
\u201c\u5728\u82b1\u4e86 2 \u4e2a\u5c0f\u65f6\u5b66\u4e60\u6559\u7a0b\u4ee5\u540e\uff0c\u6211\u57fa\u672c\u4e0a\u61c2\u7684\u5c31\u662f ddp \u547d\u4ee4\u53ef\u4ee5\u4ea4\u6362\u4e24\u884c\u7684\u5185\u5bb9\uff0c\u771f\u662f\u86cb\u75bc\u554a\u3002\u201d<\/p>\n
\u201c\u54c7\u5662\uff0c\u4efb\u4f55\u5730\u65b9\u90fd\u6709 Vim \u554a\uff0c\u8fd9\u610f\u5473\u7740\u8fd9\u4ed8\u51fa\u7684\u6240\u6709\u7684\u52aa\u529b\u5c06\u4e0d\u4f1a\u767d\u8d39\uff0c\u6bd4\u5982\u5f53\u6211\u7528 ssh \u8fdc\u7a0b\u767b\u5165\u4e3b\u673a\u4fee\u6539\u4e00\u4e9b\u914d\u7f6e\u7684\u65f6\u5019\u3002\u201d<\/p>\n
\u201c\u592a\u723d\u4e86\uff0c\u563f\uff0c\u670b\u53cb\u4eec\u6765\u770b\u770b\u8fd9\u4e2a\u5168\u6697\u8272\u7684\u914d\u8272\u4e3b\u9898\uff0c\u6211\u65b0\u7684\u5de5\u5177\u94fe\u8868\u9762\u4e0a\u770b\u8d77\u6765\u975e\u5e38\u5b89\u9038\u4e86\u3002\u201d<\/p>\n
\u201c\u5662\uff0c\u771f\u662f\u626f\u86cb\uff0c\u6211\u7684 .vimrc \u6ca1\u6709\u5728\u6211\u7684\u8fdc\u7a0b\u4e3b\u673a\u91cc\uff0c\u5f53\u6211 ssh \u767b\u5165\u7f16\u8f91\u4e00\u4e9b\u914d\u7f6e\u7684\u65f6\u5019\uff0c\u6240\u6709\u6211\u7684\u9177\u73a9\u610f\u90fd\u6ca1\u4e86\u3002\u201d<\/p>\n
HJKL \u7684\u79fb\u52a8\u65b9\u5f0f\u4e60\u60ef\u6210\u81ea\u7136\uff0c\u4f60\u795e\u79d8\u7684\u5931\u53bb\u4e86\u4f7f\u7528\u9f20\u6807\u7684\u80fd\u529b\u3002<\/p>\n
\u201c\u6211\u5c06\u59cb\u7ec8\u4f7f\u7528\u6211\u521a\u4e0b\u8f7d\u7684\u8fd9 400 \u4e2a\u63d2\u4ef6!\u5c24\u5176\u662f\u8fd9\u4e2a\u6298\u53e0 latex \u8bed\u6cd5\u7684\u63d2\u4ef6\uff0c\u5662\uff0c\u54e5\u4eec\u3002\u201d<\/p>\n
\u201c\u4f7f\u7528\u5c0f\u7bad\u5934\u65b9\u5411\u952e\u7b80\u76f4\u662f\u81ea\u6211\u6298\u78e8\u554a\u3002\u201d<\/p>\n
\u201c\u518d\u89c1\uff0cCaps Lock \u952e\u3002\u201d<\/p>\n
\u201c\u5c31\u8fd9\u6837\u5427\uff0c\u8fd9\u662f\u5fcd\u8010\u7684\u6781\u9650\uff0cVim \u751a\u81f3\u4e0d\u80fd\u8ba9\u6587\u672c\u5408\u9002\u7684\u81ea\u52a8\u6362\u884c\uff0c\u6211\u51c6\u5907\u56de\u5230 edit.com\u4e86\u3002\u201d<\/p>\n
\u66f4\u5c11\u7684\u5927\u58f0\u8bf4\u8bdd\u4e86\u3002<\/p>\n
\u5b89\u88c5 command-T \u63d2\u4ef6\uff0c\u6bcf\u5929\u8282\u7ea6\u6210\u767e\u4e0a\u5343\u6b21\u7684\u952e\u76d8\u6572\u51fb\u3002<\/p>\n
\u7528\u5b8f\u8bd5\u7740\u8ba9\u4f60\u80a9\u8180\u540e\u7684\u67d0\u4e2a\u4eba\u611f\u5230\u5370\u8c61\u6df1\u523b\uff0c\u53ea\u9700\u8981\u5bf9\u6574\u4e2a\u6587\u4ef6\u6df7\u5408\u5927\u5c0f\u5199\u548c\u63ba\u6742 ROT13 \u6697\u7801(\u56de\u8f6c\u5341\u4e09\u4f4d\u52a0\u5bc6)\u3002<\/p>\n
\u6700\u7ec8\u5728\u67d0\u4e2a\u5947\u8ff9\u822c\u7684\u4e00\u5929\u5b66\u4f1a\u5728\u808c\u8089\u8bb0\u5fc6\u91cc\u7528 ctrl+[ \u6765\u5ef6\u7f13\u4e86\u8155\u5173\u8282\u708e\u75c7\u964d\u4e34\u3002<\/p>\n
\u5b66\u4f1a\u4e86\u79fb\u52a8\u5149\u6807\uff0c\u4f7f\u7528 visual \u6a21\u5f0f\u548c * \u952e\u2014\u2014\u8fd9\u610f\u5473\u7740\u5df2\u7ecf\u6ca1\u6709\u9000\u8def\u4e86\u3002<\/p>\n
\u201cVim \u4e0d\u652f\u6301\u4ea4\u4e92\u7f13\u5b58?\u90fd 20 \u5e74\u4e86?\u597d\u5427\uff0c\u4f5c\u4e3a\u4e00\u540d\u9ed1\u5ba2\uff0c\u6211\u51b3\u5b9a\u7ed9\u5b83\u6dfb\u52a0\u8fd9\u9879\u652f\u6301\u3002\u201d<\/p>\n
\u67e5\u770b Vim \u4ee3\u7801\u5e93\uff0c\u75af\u72c2\u5730\u8ba9\u5b83\u5411\u76f8\u53cd\u7684\u65b9\u5411\u8fd0\u884c\u3002<\/p>\n
\u201c\u4e0d\u7ba1\u662f\u8c01\u90fd\u9700\u8981\u5728\u7f16\u8f91\u5668\u91cc\u5f04\u4e2a\u63a7\u5236\u53f0!!!\u8fd9\u5c31\u662f unix \u54f2\u5b66\u3002\u201d<\/p>\n
\u5bf9\u5468\u56f4\u7684\u201dVim \u53ea\u662f\u5c06\u4e00\u4e2a\u7f16\u8f91\u6a21\u5f0f\u5408\u5e76\u5230\u771f\u6b63\u7684\u7f16\u8f91\u5668\u4e2d\u201c\u89c2\u5ff5\u611f\u5230\u65e0\u53ef\u5fcd\u8010\u3002<\/p>\n
\u56e0\u4e3a\u4f60\u8001\u662f\u5728\u804a\u5929\u5ba4\u91cc\u4ee4\u4eba\u8ba8\u538c\u5730\u56de\u590d\u201d:w\u201d\uff0cIRC\u7684\u670b\u53cb\u4eec\u6700\u540e\u5c06\u4f60\u5b64\u7acb\u3002<\/p>\n
Vim \u811a\u672c\u5c31\u662f\u4e00\u79cd\u5bf9\u4e0a\u5e1d\u7684\u6df1\u6076\u75db\u7edd\u3002<\/p>\n
\u6709\u70b9\u89c9\u5f97 emacs \u7684\u4ece\u59cb\u81f3\u7ec8\u7684\u6307\u4ee4\u6a21\u5f0f\u76f8\u5bf9\u6709\u70b9\u50cf\u5728\u5929\u5802\u4e00\u6837\u3002<\/p>\n
\u201c\u6211\u6628\u665a\u505a\u4e86\u4e00\u4e2a\u5669\u68a6\uff0c\u68a6\u5230\u6211\u59cb\u7ec8\u6ca1\u6709\u5b66\u4f1a\u5728\u5bbd\u5c4f\u663e\u793a\u5668\u4e2d\u5782\u76f4\u5207\u5206\u7a97\u53e3\uff0c\u8fd9\u6837\u63d0\u5fc3\u540a\u80c6\u771f\u662f\u591f\u6df7\u5e10\u554a\u3002\u201d<\/p>\n
\u5077\u5077\u5730\u7784\u4e00\u4e0b\u5468\u56f4\uff0c\u7ed1\u5b9a ctrl+s \u5230\u4fdd\u5b58\u52a8\u4f5c\uff0c\u5141\u8bb8\u81ea\u5df1\u6084\u6084\u5730\u677e\u4e00\u53e3\u6c14\u3002<\/p>\n
\u610f\u8bc6\u5230 HJKL \u641c\u7d22\u5b9a\u4f4d\u4e0d\u8db3\u4ee5\u6210\u4e3a\u65f6\u95f4\u8282\u7ea6\u7684\u7ec8\u6781\u5de5\u5177\uff0c\u53d1\u73b0 :python \u811a\u672c\uff0c\u6240\u5efa\u7acb\u7684\u5927\u91cf\u5b9a\u5236\u529f\u80fd\u8fbe\u5230\u9f0e\u76db\u671f\uff0c\u5bf9<Leader> \u952e\u7ed1\u5b9a\uff0c\u76f4\u5230\u4f60\u7684\u952e\u76d8\u7c7b\u4f3c\u4e8e NASA \u6307\u6325\u4e2d\u5fc3\u63a7\u5236\u9762\u677f\u4e00\u6837\u6709\u70b9\u7e41\u591a\u5230\u8352\u8c2c\u7684\u529f\u80fd\uff0c\u611f\u89c9\u6709\u4e00\u70b9\u7cdf\u7cd5\u3002<\/p>\n
\u201c\u563f\uff0c\u6bcf\u4e2a\u542c\u7684\u5230\u6211\u58f0\u97f3\u7684\u5bb6\u4f19\u8fc7\u6765\u770b\u770b\uff0c\u6211\u73b0\u5728\u63a7\u5236\u7535\u8111\uff0c\u5199\u535a\u5ba2\uff0c\u68c0\u67e5\u90ae\u4ef6\uff0c\u8fd0\u884c\u6d4b\u8bd5\uff0c\u8c03\u8bd5\u7a0b\u5e8f\uff0c\u6d4f\u89c8 hackernews<\/p>\n
\u6240\u6709\u7684\u4e00\u5207\u90fd\u80fd\u5728 Vim \u6e29\u6696\u8212\u9002\u3001\u8d85\u7ea7\u53ef\u4ee5\u5b9a\u5236\u5316\u7684\u6bcd\u4f53\u4e2d\u8fdb\u884c\u3002\u4e3a\u4ec0\u4e48\u4f60\u8fd9\u5c0f\u5b50\u4e0d\u505a\u51e0\u4e2a\u540e\u7a7a\u7ffb\u6765\u5e86\u795d\u4e00\u4e0b\u5462?\u201d<\/p>\n
\u5728\u201c\u6587\u672c\u7f16\u8f91\u4e2d\u6a21\u6001\u7684\u660e\u663e\u4f18\u52bf\u201d\u6f14\u8bb2\u7ed3\u675f\u540e\u5931\u53bb\u4e86\u51e0\u4e2a\u670b\u53cb\u3002<\/p>\n
\u5c3d\u60c5\u4eab\u53d7\u5728 github.com\/me\/vimfiles (\u5e76\u6ca1\u6709)\u4e2d\u5206\u4eab\u81ea\u5df1\u914d\u7f6e\u7684\u5feb\u4e50\u4e2d\uff0c\u5f3a\u5236\u81ea\u5df1\u5199\u5173\u4e8e\u5982\u4f55\u7279\u7acb\u72ec\u884c\u5730\u5b89\u88c5\u8bed\u6cd5\u68c0\u67e5\uff0clint\u5de5\u5177\uff0c\u81ea\u52a8\u8865\u5168\uff0c\u5feb\u901f\u6587\u6863\u67e5\u770b\uff0c\u6210\u5428\u7684\u6740\u624b\u7ea7\u7f29\u5199\uff0c\u4e16\u754c\u4e0a\u6240\u6709\u6587\u4ef6\u7c7b\u578b\u5bf9\u5e94\u7684\u63d2\u4ef6\uff0c\u4f7f Vim \u5728\u6bcf\u79cd\u529f\u80fd\u7684\u9ad8\u6548\u6027\u4e0a\u63a5\u8fd1\u771f\u6b63\u7684 IDE \u7684\u535a\u5ba2\u5e16\u5b50\u3002\u5f00\u673a\u65f6\u95f4\u65e5\u5fd7\u5199\u5165\u670d\u52a1\u5668\uff0c\u4e0b\u610f\u8bc6\u5730\u4f7f\u7528 nano \u6765\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6\u3002\u4e0d\u4f1a\u4e3a\u6ca1\u6709\u4f7f\u7528\u63d2\u4ef6\u548c vimrc \u4e2d\u7684\u66f4\u591a\u8bed\u6cd5\u800c\u66f4\u65b0\u6240\u6709\u7684\u914d\u7f6e\u6587\u4ef6\u800c\u611f\u5230\u6df1\u6df1\u7684\u7f9e\u6127\u3002<\/p>\n
\u53d8\u5f97\u5341\u5206\u6de1\u5b9a\uff0c\u91cd\u590d\u6027\u7684\u7f16\u8f91\u4efb\u52a1\u518d\u4e5f\u96be\u4e0d\u4f4f\u4f60\uff0c\u4e0d\u518d\u53bb\u53c2\u52a0 emacs \u4e0e Vim \u8c01\u597d\u8c01\u574f\u7684\u4e89\u8bba\u3002<\/p>\n
<\/p>\n
\n\u539f\u6587\u6765\u81ea\uff1ahttp:\/\/os.51cto.com\/art\/201608\/515597.html<\/a><\/p>\n