{"id":116521,"date":"2018-08-25T08:05:06","date_gmt":"2018-08-25T00:05:06","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=116521"},"modified":"2018-08-21T10:06:26","modified_gmt":"2018-08-21T02:06:26","slug":"vim-editor-learn","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/vim-editor-learn.html","title":{"rendered":"Vim\u7f16\u8f91\u5668"},"content":{"rendered":"
Vim \u662f\u4ece\u00a0vi \u53d1\u5c55\u51fa\u6765\u7684\u4e00\u4e2a\u6587\u672c\u7f16\u8f91\u5668\u3002\u5b83\u7c7b\u4f3c\u4e8evi\u4f46\u53c8\u5b58\u5728\u533a\u522b\uff0c\u56e0\u4e3a\u5b83\u529f\u80fd\u5f3a\u5927\u4e14\u9ad8\u5ea6\u53ef\u914d\u7f6e\uff0c\u5728vi\u7684\u57fa\u7840\u4e0a\u8fdb\u884c\u4e86\u5f88\u591a\u7684\u6539\u8fdb\u3002\u4ee3\u7801\u8865\u5168\u3001\u7f16\u8bd1\u53ca\u9519\u8bef\u8df3\u8f6c\u7b49\u65b9\u4fbf\u7f16\u7a0b\u7684\u529f\u80fd\u7279\u522b\u4e30\u5bcc\uff0c\u5728\u7a0b\u5e8f\u5458\u4e2d\u88ab\u5e7f\u6cdb\u4f7f\u7528\uff0c\u8fd8\u53ef\u4ee5\u521b\u5efa\u548c\u66f4\u6539\u4efb\u4f55\u7c7b\u578b\u7684\u6587\u672c\uff0c\u6548\u7387\u975e\u5e38\u9ad8\u3002<\/p>\n
\u800c\u4ece vi \u53d1\u5c55\u51fa\u6765\u7684 Vim \u5177\u6709\u5f88\u591a\u6a21\u5f0f\uff0c\u8fd9\u79cd\u72ec\u7279\u7684\u8bbe\u8ba1\u5bb9\u6613\u4f7f\u521d\u5b66\u8005\u4ea7\u751f\u6df7\u6dc6\u3002<\/p>\n
Vim \u5177\u67096\u4e2d\u57fa\u672c\u6a21\u5f0f\u548c5\u4e2d\u6d3e\u751f\u6a21\u5f0f<\/p>\n
\u5728\u666e\u901a\u6a21\u5f0f\u4e2d\uff0c\u7528\u7684\u7f16\u8f91\u5668\u547d\u4ee4\uff0c\u6bd4\u5982\u79fb\u52a8\u5149\u6807\uff0c\u5220\u9664\u6587\u672c\u7b49\u7b49\u3002\u8fd9\u4e5f\u662fVim \u542f\u52a8\u540e\u7684\u9ed8\u8ba4\u6a21\u5f0f\u3002Vim \u5f3a\u5927\u7684\u7f16\u8f91\u80fd\u529b\u6765\u81ea\u4e8e\u5176\u666e\u901a\u6a21\u5f0f\u547d\u4ee4\u3002\u666e\u901a\u6a21\u5f0f\u547d\u4ee4\u5f80\u5f80\u9700\u8981\u4e00\u4e2a\u64cd\u4f5c\u7b26\u7ed3\u5c3e\u3002\u4f8b\u5982\u666e\u901a\u6a21\u5f0f\u547d\u4ee4\u201ddd\u201d\u5220\u9664\u5f53\u524d\u884c\uff0c\u4f46\u662f\u7b2c\u4e00\u4e2a\u201dd\u201d\u7684\u540e\u9762\u53ef\u4ee5\u8ddf\u53e6\u5916\u7684\u79fb\u52a8\u547d\u4ee4\u6765\u4ee3\u66ff\u7b2c\u4e8c\u4e2a\u201dd\u201d\uff0c\u6bd4\u5982\u7528\u79fb\u52a8\u5230\u4e0b\u4e00\u884c\u7684\u201dj\u201d\u952e\u5c31\u53ef\u4ee5\u5220\u9664\u5f53\u524d\u884c\u548c\u4e0b\u4e00\u884c\u3002\u53e6\u5916\u8fd8\u53ef\u4ee5\u6307\u5b9a\u547d\u4ee4\u91cd\u590d\u6b21\u6570\uff0c\u201d2dd\u201d\uff08\u91cd\u590d\u201ddd\u201d\u4e24\u6b21\uff09\uff0c\u548c\u201ddj\u201d\u7684\u6548\u679c\u662f\u4e00\u6837\u7684\u3002\u5728\u666e\u901a\u6a21\u5f0f\u4e2d\uff0c\u6709\u5f88\u591a\u65b9\u6cd5\u53ef\u4ee5\u8fdb\u5165\u63d2\u5165\u6a21\u5f0f\u3002\u6bd4\u8f83\u666e\u901a\u7684\u65b9\u5f0f\u662f\u6309\u201da\u201d\uff08append\uff0f\u8ffd\u52a0\uff09\u952e\u6216\u8005\u201di\u201d\uff08insert\uff0f\u63d2\u5165\uff09\u952e\u3002<\/p>\n
\u5728\u8fd9\u4e2a\u6a21\u5f0f\u4e2d\uff0c\u5927\u591a\u6570\u6309\u952e\u90fd\u4f1a\u5411\u6587\u672c\u7f13\u51b2\u533a\u4e2d\u63d2\u5165\u6587\u672c\u3002\u5927\u591a\u6570\u65b0\u7528\u6237\u5e0c\u671b\u6587\u672c\u7f16\u8f91\u5668\u7f16\u8f91\u8fc7\u7a0b\u4e2d\u4e00\u76f4\u4fdd\u6301\u8fd9\u4e2a\u6a21\u5f0f\u3002\u5728\u63d2\u5165\u6a21\u5f0f\u4e2d\uff0c\u53ef\u4ee5\u6309ESC \u952e\u56de\u5230\u666e\u901a\u6a21\u5f0f\u3002<\/p>\n
\u8fd9\u4e2a\u6a21\u5f0f\u4e0e\u666e\u901a\u6a21\u5f0f\u6bd4\u8f83\u76f8\u4f3c\u3002\u4f46\u662f\u79fb\u52a8\u547d\u4ee4\u4f1a\u6269\u5927\u9ad8\u4eae\u7684\u6587\u672c\u533a\u57df\u3002\u9ad8\u4eae\u533a\u57df\u53ef\u4ee5\u662f\u5b57\u7b26\u3001\u884c\u6216\u8005\u662f\u4e00\u5757\u6587\u672c\u3002\u5f53\u6267\u884c\u4e00\u4e2a\u975e\u79fb\u52a8\u547d\u4ee4\u65f6\uff0c\u547d\u4ee4\u4f1a\u88ab\u6267\u884c\u5230\u8fd9\u5757\u9ad8\u4eae\u7684\u533a\u57df\u4e0a\u3002Vim \u7684\u201d\u6587\u672c\u5bf9\u8c61\u201d\u4e5f\u80fd\u548c\u79fb\u52a8\u547d\u4ee4\u4e00\u6837\u7528\u5728\u8fd9\u4e2a\u6a21\u5f0f\u4e2d\u3002<\/p>\n
\u8fd9\u4e2a\u6a21\u5f0f\u548c\u65e0\u6a21\u5f0f\u7f16\u8f91\u5668\u7684\u884c\u4e3a\u6bd4\u8f83\u76f8\u4f3c\u3002\u8fd9\u4e2a\u6a21\u5f0f\u4e2d\uff0c\u53ef\u4ee5\u7528\u9f20\u6807\u6216\u8005\u5149\u6807\u952e\u9ad8\u4eae\u9009\u62e9\u6587\u672c\uff0c\u4e0d\u8fc7\u8f93\u5165\u4efb\u4f55\u5b57\u7b26\u7684\u8bdd\uff0cVim \u4f1a\u7528\u8fd9\u4e2a\u5b57\u7b26\u66ff\u6362\u9009\u62e9\u7684\u9ad8\u4eae\u6587\u672c\u5757\uff0c\u5e76\u4e14\u81ea\u52a8\u8fdb\u5165\u63d2\u5165\u6a21\u5f0f\u3002<\/p>\n
\u5728\u547d\u4ee4\u884c\u6a21\u5f0f\u4e2d\u53ef\u4ee5\u8f93\u5165\u4f1a\u88ab\u89e3\u91ca\u6210\u5e76\u6267\u884c\u7684\u6587\u672c\u3002\u4f8b\u5982\u6267\u884c\u547d\u4ee4\uff08\u201d:\u201d\u952e\uff09\uff0c\u641c\u7d22\uff08\u201d\/\u201d\u548c\u201d?\u201d\u952e\uff09\u6216\u8005\u8fc7\u6ee4\u547d\u4ee4\uff08\u201d!\u201d\u952e\uff09\u3002\u5728\u547d\u4ee4\u6267\u884c\u4e4b\u540e\uff0cVim \u8fd4\u56de\u5230\u547d\u4ee4\u884c\u6a21\u5f0f\u4e4b\u524d\u7684\u6a21\u5f0f\uff0c\u901a\u5e38\u662f\u666e\u901a\u6a21\u5f0f\u3002<\/p>\n
\u8fd9\u548c\u547d\u4ee4\u884c\u6a21\u5f0f\u6bd4\u8f83\u76f8\u4f3c\uff0c\u5728\u4f7f\u7528\u201d:visual\u201d\u547d\u4ee4\u79bb\u5f00 Ex \u6a21\u5f0f\u524d\uff0c\u53ef\u4ee5\u4e00\u6b21\u6267\u884c\u591a\u6761\u547d\u4ee4\u3002<\/p>\n
\u8fd9\u4e2a\u6d3e\u751f\u6a21\u5f0f\u6307\u666e\u901a\u6a21\u5f0f\u4e2d\uff0c\u6267\u884c\u4e00\u4e2a\u64cd\u4f5c\u547d\u4ee4\u540e Vim \u7b49\u5f85\u4e00\u4e2a\u201d\u52a8\u4f5c\u201d\u6765\u5b8c\u6210\u8fd9\u4e2a\u547d\u4ee4\u3002Vim \u4e5f\u652f\u6301\u5728\u64cd\u4f5c\u7b26\u7b49\u5f85\u6a21\u5f0f\u4e2d\u4f7f\u7528\u201d\u6587\u672c\u5bf9\u8c61\u201d\u4f5c\u4e3a\u52a8\u4f5c\uff0c\u5305\u62ec\u201daw\u201d\u4e00\u4e2a\u5355\u8bcd\uff08a word\uff09\u3001\u201das\u201d\u4e00\u4e2a\u53e5\u5b50\uff08a sentence\uff09\u3001\u201dap\u201d\u4e00\u4e2a\u6bb5\u843d\uff08a paragraph\uff09\u7b49\u7b49\u3002\u6bd4\u5982\uff0c\u5728\u666e\u901a\u6a21\u5f0f\u4e0b\u201dd2as\u201d\u5220\u9664\u5f53\u524d\u548c\u4e0b\u4e00\u4e2a\u53e5\u5b50\u3002\u5728\u53ef\u89c6\u6a21\u5f0f\u4e0b\u201dapU\u201d\u628a\u5f53\u524d\u6bb5\u843d\u6240\u6709\u5b57\u6bcd\u5927\u5199\u3002<\/p>\n
\u8fd9\u4e2a\u6a21\u5f0f\u662f\u5728\u63d2\u5165\u6a21\u5f0f\u4e0b\u6309\u4e0b ctrl+o \u952e\u7684\u65f6\u5019\u8fdb\u5165\u3002\u8fd9\u4e2a\u65f6\u5019\u6682\u65f6\u8fdb\u5165\u666e\u901a\u6a21\u5f0f\uff0c\u6267\u884c\u5b8c\u4e00\u4e2a\u547d\u4ee4\u4e4b\u540e\uff0cVim \u8fd4\u56de\u63d2\u5165\u6a21\u5f0f<\/p>\n
\u8fd9\u4e2a\u6a21\u5f0f\u662f\u5728\u63d2\u5165\u6a21\u5f0f\u4e0b\u6309\u4e0b ctrl+o \u952e\u5e76\u4e14\u5f00\u59cb\u4e00\u4e2a\u53ef\u89c6\u9009\u62e9\u7684\u65f6\u5019\u5f00\u59cb\u3002\u5728\u53ef\u89c6\u533a\u57df\u9009\u62e9\u53d6\u6d88\u7684\u65f6\u5019\uff0cVim \u8fd4\u56de\u63d2\u5165\u6a21\u5f0f\u3002<\/p>\n
\u901a\u5e38\u8fd9\u4e2a\u6a21\u5f0f\u7531\u63d2\u5165\u6a21\u5f0f\u4e0b\u9f20\u6807\u62d6\u62fd\u6216\u8005 shift \u65b9\u5411\u952e\u6765\u8fdb\u5165\u3002\u5f53\u9009\u62e9\u533a\u57df\u53d6\u6d88\u7684\u65f6\u5019\uff0cVim\u8fd4\u56de\u63d2\u5165\u6a21\u5f0f\u3002<\/p>\n
\u8fd9\u662f\u4e00\u4e2a\u7279\u6b8a\u7684\u63d2\u5165\u6a21\u5f0f\uff0c\u5728\u8fd9\u4e2a\u6a21\u5f0f\u4e2d\u53ef\u4ee5\u505a\u548c\u63d2\u5165\u6a21\u5f0f\u4e00\u6837\u7684\u64cd\u4f5c\uff0c\u4f46\u662f\u6bcf\u4e2a\u8f93\u5165\u7684\u5b57\u7b26\u90fd\u4f1a\u8986\u76d6\u6587\u672c\u7f13\u51b2\u4e2d\u5df2\u7ecf\u5b58\u5728\u7684\u5b57\u7b26\u3002\u5728\u666e\u901a\u6a21\u5f0f\u4e0b\u6309\u201dR\u201d\u952e\u8fdb\u5165\u3002<\/p>\n
Evim\uff08Easy Vim\uff09\u662f\u4e00\u4e2a\u7279\u6b8a\u7684GUI\u6a21\u5f0f\u7528\u6765\u5c3d\u91cf\u7684\u8868\u73b0\u7684\u548c\u201d\u65e0\u6a21\u5f0f\u201d\u7f16\u8f91\u5668\u4e00\u6837\u3002\u7f16\u8f91\u5668\u81ea\u52a8\u8fdb\u5165\u5e76\u4e14\u505c\u7559\u5728\u63d2\u5165\u6a21\u5f0f\uff0c\u7528\u6237\u53ea\u80fd\u901a\u8fc7\u83dc\u5355\u3001\u9f20\u6807\u548c\u952e\u76d8\u63a7\u5236\u952e\u6765\u5bf9\u6587\u672c\u8fdb\u884c\u64cd\u4f5c\u3002\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u4e0b\u8f93\u5165\u201devim\u201d\u6216\u8005\u201dvim -y\u201d\u8fdb\u5165\u3002\u5728 Windows \u4e0b\uff0c\u901a\u5e38\u4e5f\u53ef\u4ee5\u70b9\u51fb\u684c\u9762\u4e0a Evim\uff08Easy Vim\uff09\u7684\u56fe\u6807\u3002<\/p>\n
\u5728\u6b63\u5f0f\u63a5\u89e6\u5230 Vim \u4e4b\u524d\uff0c\u4f60\u4e00\u5b9a\u4ece\u522b\u4eba\u90a3\u91cc\u542c\u8bf4\u8fc7 Vim \u662f\u591a\u4e48\u591a\u4e48\u7684\u5f3a\u65e0\u654c\uff0c\u867d\u7136\u5b83\u7684\u547d\u4ee4\u7684\u786e\u975e\u5e38\u65b9\u4fbf\uff0c\u4f46\u662f\u8981\u6b63\u786e\u7684\u5165\u95e8\u5374\u4e0d\u662f\u4e00\u4ef6\u5bb9\u6613\u7684\u4e8b\u3002\u4e00\u4e0d\u5c0f\u5fc3\u5c31\u4f1a\u5f04\u6210\u300aVim\u2014\u2014\u4ece\u5165\u95e8\u5230\u653e\u5f03\u300b\u3002<\/p>\n
\u8981\u5b66\u4e60\u8fd9\u4e2a\u5de5\u5177\uff0c\u9996\u5148\u5f97\u660e\u767d\u4ee5\u4e0b\u51e0\u70b9\uff1a<\/p>\n
1\uff0c\u5b66\u4e60Vim\u5728\u5f00\u59cb\u662f\u75db\u82e6\u7684<\/p>\n
2\uff0c\u4e0d\u8981\u5e0c\u671b\u4f603\u5929\u5c31\u80fd\u7cbe\u901a\uff0c\u5b9e\u9645\u4e0a\u4f60\u53ef\u80fd\u9700\u89812\u5468\u751a\u81f3\u66f4\u4e45\u3002<\/p>\n
3\uff0c\u9700\u8981\u4e0d\u65ad\u7684\u7ec3\u4e60\u3002<\/p>\n
1\uff0c\u5728 Insert\/Normal \u6a21\u5f0f\u4e0b\u7f16\u8f91\u6587\u6863\uff08\u4e94\u4e2a\u547d\u4ee4\uff1ai\uff0cx\uff0c\uff1awq\uff0cdd\uff0cp\uff09<\/p>\n
2\uff0c\u5b66\u4e60\u66f4\u591a\u7684\u547d\u4ee4\uff08\u63d2\u5165\u6a21\u5f0f\uff0c\u79fb\u52a8\u5149\u6807\uff0c\u62f7\u8d1d\/\u7c98\u8d34\uff0cUndo\/Redo\uff0c\u6253\u5f00\/\u4fdd\u5b58\/\u9000\u51fa\/\u6539\u53d8\u6587\u4ef6\uff09<\/p>\n
3\uff0c\u5b66\u4e60\u6280\u5de7\u578b\u547d\u4ee4\uff08\u5982\u4f55\u66f4\u597d\uff0c\u66f4\u5feb\uff0c\u66f4\u5f3a\uff09<\/p>\n
4\uff0c\u5b66\u4e60\u8d85\u80fd\u529b\uff08\u8d85\u80fd\u529b\u7ea7\u529f\u80fd\uff09<\/p>\n
Vim\u4e2d\u7684\u547d\u4ee4\u6570\u4e0d\u80dc\u6570\uff0c\u5b83\u53ef\u4ee5\u8ba9\u4f60\u53ea\u9700\u8981\u770b\u4f60\u7684\u952e\u76d8\u5c31\u53ef\u4ee5\u5b8c\u6210\u6240\u6709\u7684\u4e8b\u60c5\uff0c\u4f46\u662f\u5176\u4e2d\u5e76\u4e0d\u662f\u6240\u6709\u7684\u547d\u4ee4\u90fd\u90a3\u4e48\u5e38\u7528\uff0c\u8fd9\u91cc\u5c31\u5217\u4e3e\u90a3\u4e9b\u6700\u6709\u7528\u7684\u547d\u4ee4\u3002<\/p>\n
\u8fd9\u4e9b\u547d\u4ee4\u4e5f\u53ef\u4ee5\u5206\u4e3a\u4ee5\u4e0b\u56db\u7ea7<\/p>\n
1\uff0c\u5728 Insert\/Normal \u6a21\u5f0f\u4e0b\u7f16\u8f91\u6587\u6863\uff08\u4e94\u4e2a\u547d\u4ee4\uff1ai\uff0cx\uff0c\uff1awq\uff0cdd\uff0cp\uff09<\/p>\n
2\uff0c\u5b66\u4e60\u66f4\u591a\u7684\u547d\u4ee4\uff08\u63d2\u5165\u6a21\u5f0f\uff0c\u79fb\u52a8\u5149\u6807\uff0c\u62f7\u8d1d\/\u7c98\u8d34\uff0cUndo\/Redo\uff0c\u6253\u5f00\/\u4fdd\u5b58\/\u9000\u51fa\/\u6539\u53d8\u6587\u4ef6\uff09<\/p>\n
3\uff0c\u5b66\u4e60\u6280\u5de7\u578b\u547d\u4ee4\uff08\u5982\u4f55\u66f4\u597d\uff0c\u66f4\u5feb\uff0c\u66f4\u5f3a\uff09<\/p>\n
4\uff0c\u5b66\u4e60\u8d85\u80fd\u529b\uff08\u6740\u624b\u7ea7\u529f\u80fd\uff09<\/p>\n
\u6253\u5f00vim\u4e4b\u540e\u9ed8\u8ba4\u662fNormal\u6a21\u5f0f\u3002Normal\u6a21\u5f0f\u4e0b\u4f60\u53ef\u4ee5\u64cd\u4f5c\u4f60\u7684\u5149\u6807\uff0c\u63a5\u4e0b\u6765\u662fNormal\u6a21\u5f0f\u4e2d\u7684\u4e00\u4e9b\u7b80\u5355\u547d\u4ee4\uff0c\u5728Normal\u6a21\u5f0f\u4e0b\uff0c\u51e0\u4e4e\u6240\u6709\u7684\u952e\u90fd\u662f\u529f\u80fd\u952e\u3002<\/p>\n
<\/p>\n
i \u2014\u2014 \u63d2\u5165\u6a21\u5f0f\uff0c\u8fd9\u4e2a\u6a21\u5f0f\u8ba9\u4f60\u4f60\u53ef\u4ee5\u50cf\u8bb0\u4e8b\u672c\u4e00\u6837\u7684\u8f93\u5165\u6587\u672c\uff0c\u5982\u679c\u5df2\u7ecf\u8f93\u5165\u5b8c\u4e86\uff0c\u6309ESC\u8fd4\u56deNormal\u6a21\u5f0f\u3002<\/p>\n
x \u2014\u2014 \u5220\u9664\u5f53\u524d\u5149\u6807\u6240\u5728\u5904\u7684\u5b57\u7b26<\/p>\n
:w \u2014\u2014 \u5b58\u76d8<\/p>\n
:q \u2014\u2014 \u9000\u51fa\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528 :wq\u6765\u540c\u65f6\u8fdb\u884c\u8fd9\u4e24\u4e2a\u64cd\u4f5c<\/p>\n
dd \u2014\u2014 \u526a\u5207\u5f53\u524d\u884c<\/p>\n
p \u2014\u2014 \u7c98\u8d34<\/p>\n
hjkl \u2014\u2014 \u6548\u679c\u7b49\u540c\u4e8e\u2190\u2193\u2191\u2192\uff0c\u7528\u4e8e\u79fb\u52a8\u5149\u6807<\/p>\n
:help<command> \u2014\u2014 \u663e\u793a\u76f8\u5173\u547d\u4ee4\u7684\u5e2e\u52a9<\/p>\n
\u9664\u4e86i\u4e4b\u5916\uff0c\u8fd8\u6709\u522b\u7684\u63d2\u5165\u6a21\u5f0f\u53ef\u4ee5\u9009\u62e9<\/p>\n
a \u2014\u2014 \u5728\u5149\u6807\u540e\u63d2\u5165<\/p>\n
o \u2014\u2014 \u5728\u5f53\u524d\u884c\u540e\u63d2\u5165\u65b0\u884c<\/p>\n
O \u2014\u2014 \u5728\u5f53\u524d\u884c\u524d\u63d2\u5165\u65b0\u884c<\/p>\n
0 \u2014\u2014 \u6570\u5b57\u96f6\uff0c\u5230\u884c\u5934<\/p>\n
^ \u2014\u2014 \u5230\u672c\u884c\u7b2c\u4e00\u4e2a\u4e0d\u662f\u7a7a\u5b57\u7b26\u7684\u4f4d\u7f6e<\/p>\n
$ \u2014\u2014 \u5230\u884c\u5c3e<\/p>\n
g_ \u2014\u2014 \u5230\u884c\u5c3e\u6700\u540e\u4e00\u4e2a\u4e0d\u662f\u7a7a\u5b57\u7b26\u7684\u4f4d\u7f6e<\/p>\n
\/pa \u2014\u2014 \u641c\u7d22 pa \u8fd9\u4e2a\u5b57\u7b26\u4e32\uff0c\u6309n\u67e5\u627e\u4e0b\u4e00\u4e2a<\/p>\n
:e <path\/to\/file> \u2014\u2014 \u6253\u5f00\u4e00\u4e2a\u6587\u4ef6<\/p>\n
:saveas <path\/to\/file> \u2014\u2014 \u53e6\u5b58\u4e3a<\/p>\n
:q! \u2014\u2014 \u4e0d\u4fdd\u5b58\u9000\u51fa :qa!\u53ef\u4ee5\u9000\u51fa\u6240\u6709\u7f16\u8f91\u4e2d\u7684\u6587\u4ef6<\/p>\n
:bn :bp \u2014\u2014\u5f53\u4f60\u6253\u5f00\u4e86\u5f88\u591a\u6587\u4ef6\uff0c\u7528\u8fd9\u4e2a\u5207\u6362\u5230\u4e0b\u4e00\u4e2a\/\u4e0a\u4e00\u4e2a<\/p>\n
\u5176\u4ed6\u7684\u6307\u4ee4<\/p>\n
u \u2014\u2014 \u64a4\u9500<\/p>\n
ctrl+r \u2014\u2014 \u91cd\u505a<\/p>\n
Vim\u91cd\u590d\u81ea\u5df1\u7684\u65b9\u6cd5<\/p>\n
. \u2014\u2014 \u5c0f\u6570\u70b9\uff0c\u91cd\u590d\u4e0a\u6b21\u547d\u4ee4<\/p>\n
N<command> \u2014\u2014 \u91cd\u590d\u4e00\u4e2a\u547d\u4ee4N\u6b21<\/p>\n
<\/p>\n
\u4e0b\u9762\u662f\u4e00\u4e2a\u7279\u6b8a\u7684\u4f8b\u5b50<\/p>\n
100imeow[ESC] \u2014\u2014 \u5199\u4e0b100\u4e2a\u201cmeow\u201d<\/p>\n
. \u2014\u2014 \u91cd\u590d\u4e0a\u4e00\u4e2a\u547d\u4ee4 \u4e5f\u5c31\u662f\u518d\u5199100\u4e2a\u201cmeow\u201d<\/p>\n
3. \u2014\u2014 \u91cd\u590d3\u6b21\u547d\u4ee4 \u5199\u4e0b3\u4e2a\uff08\u800c\u4e0d\u662f300\u4e2a\uff09\u201cmeow\u201d<\/p>\n
NG \u2014\u2014 \u79fb\u52a8\u5230\u7b2cN\u884c \uff0c:N\u4e5f\u53ef\u4ee5<\/p>\n
gg \u2014\u2014 \u5230\u7b2c\u4e00\u884c<\/p>\n
g \u2014\u2014 \u5230\u6700\u540e\u4e00\u884c<\/p>\n
w \u2014\u2014 \u5230\u4e0b\u4e00\u4e2a\u5355\u8bcd\u5f00\u5934<\/p>\n
e \u2014\u2014 \u5230\u4e0b\u4e00\u4e2a\u5355\u8bcd\u7ed3\u5c3e<\/p>\n
% \u2014\u2014 \u5f53\u5149\u6807\u5728\u62ec\u53f7\u4e0a\u65f6\uff0c\u53ef\u4ee5\u79fb\u52a8\u5230\u4e0e\u4e4b\u5bf9\u5e94\u7684\u53e6\u4e00\u4e2a\u62ec\u53f7<\/p>\n
*\u548c# \u2014\u2014 \u79fb\u52a8\u5230\u4e0b\u4e00\u4e2a\/\u4e0a\u4e00\u4e2a\u5149\u6807\u6240\u5728\u7684\u5355\u8bcd\u4e0a<\/p>\n
<\/p>\n
\u5b9e\u9645\u4e0a\u8fd9\u4e9b\u547d\u4ee4\u90fd\u53ef\u4ee5\u7ec4\u5408\u8f93\u5165\uff0c\u683c\u5f0f\u4e3a\uff1a<start position><command><end position> \u4e3e\u4e2a\u7b80\u5355\u7684\u4f8b\u5b50<\/p>\n
0y$ \u2014\u2014 0\u548c $ \u662f\u4f4d\u7f6e\uff0cy\u662f\u6307\u4ee4\uff0c\u8fd9\u4e2a\u6307\u4ee4\u7684\u610f\u601d\u5c31\u662f\u4ece\u884c\u5934\u62f7\u8d1d\u5230\u672c\u884c\u6700\u540e\u4e00\u4e2a\u5b57\u7b26\u3002<\/p>\n
<\/p>\n
\u9664\u4e86 y\uff0c\u8fd8\u6709\u4e0d\u5c11\u547d\u4ee4\u53ef\u4ee5\u8fd9\u4e48\u505a\uff0c\u6bd4\u5982<\/p>\n
d \u00a0\u2014\u2014 \u5220\u9664<\/p>\n
gU\/gu \u2014\u2014 \u53d8\u4e3a\u5927\u5199\/\u5c0f\u5199<\/p>\n
v \u2014\u2014\u53ef\u89c6\u5316\u9009\u62e9<\/p>\n
Fa\/fa \u2014\u2014 \u79fb\u52a8\u5230\u4e0a\u4e00\u4e2a\/\u4e0b\u4e00\u4e2aa\u5b57\u7b26\uff0ca\u53ef\u4ee5\u6362\u6210\u5176\u4ed6\u5b57\u7b26<\/p>\n
T,\/t, \u2014\u2014 \u79fb\u52a8\u5230\u9017\u53f7\u540e\/\u524d\u7684\u90a3\u4e00\u4e2a\u5b57\u7b26\uff0c\u9017\u53f7\u53ef\u4ee5\u6362\u6210\u5176\u4ed6\u5b57\u7b26<\/p>\n
3fa \u2014\u2014\u5230\u7b2c\u4e09\u4e2aa\u5b57\u7b26\u5904<\/p>\n
dt\u201d \u2014\u2014 \u5728\u9047\u5230\u201d\u524d\u5220\u9664\u6240\u6709\u5185\u5bb9<\/p>\n
\u533a\u57df\u9009\u62e9\u7684\u547d\u4ee4\u683c\u5f0f\u4e00\u822c\u4e3a<action>a<object> \u548c <action>i<object><\/p>\n
\u7528\u4e00\u4e2a\u7b80\u5355\u7684\u4f8b\u5b50\u6765\u533a\u522ba\u548ci<\/p>\n
\u5047\u5982\u8bf4\u6709\u8fd9\u6837\u4e00\u4e2a\u5b57\u7b26\u4e32\u2014\u2014[123((abcd))]\uff0c\u4f60\u7684\u5149\u6807\u5728b\u4e0a<\/p>\n
vi)\u2014\u2014\u4f1a\u9009\u62e9abcd<\/p>\n
va)\u2014\u2014\u4f1a\u9009\u62e9(abcd)<\/p>\n
v2i)\u2014\u2014\u4f1a\u9009\u62e9(abcd)<\/p>\n
v2a)\u2014\u2014\u4f1a\u9009\u62e9((abcd))<\/p>\n
\u5728 insert \u6a21\u5f0f\u4e0b\u8f93\u5165\u4e00\u4e2a\u8bcd\u7684\u5f00\u5934\uff0c\u7136\u540e\u6309ctrl+p\u6216+n\uff0c\u5c31\u53ef\u4ee5\u4f7f\u7528\u81ea\u52a8\u8865\u9f50\u4e86<\/p>\n
qa\u2014\u2014\u5f00\u59cb\u5f55\u5236\u5b8f\uff0c\u5e76\u628a\u4f60\u7684\u64cd\u4f5c\u8bb0\u5f55\u5728a<\/p>\n
@a\u2014\u2014 replay\u4f60\u5728a\u5f55\u5236\u7684\u5b8f<\/p>\n
@@\u2014\u2014 replay\u6700\u65b0\u7684\u5b8f<\/p>\n
\n\u539f\u6587\u6765\u81ea\uff1ahttps:\/\/openingsource.org\/1172\/<\/a><\/p>\n