{"id":10079,"date":"2022-04-13T14:33:05","date_gmt":"2022-04-13T06:33:05","guid":{"rendered":"http:\/\/blog.idc.net\/10079\/"},"modified":"2022-04-13T14:33:05","modified_gmt":"2022-04-13T06:33:05","slug":"linux-vim%e5%9f%ba%e6%9c%ac%e6%93%8d%e4%bd%9c%ef%bc%88%e6%96%87%e4%bb%b6%e7%9a%84%e6%89%93%e5%bc%80%e5%92%8c%e7%bc%96%e8%be%91%ef%bc%89%e5%ae%8c%e5%85%a8%e6%94%bb%e7%95%a5%ef%bc%88%e6%9c%89%e5%9b%be","status":"publish","type":"post","link":"https:\/\/idc.net\/help\/10079\/","title":{"rendered":"Linux Vim\u57fa\u672c\u64cd\u4f5c\uff08\u6587\u4ef6\u7684\u6253\u5f00\u548c\u7f16\u8f91\uff09\u5b8c\u5168\u653b\u7565\uff08\u6709\u56fe\u6709\u771f\u76f8\uff09"},"content":{"rendered":"<div class=\"\u201cidc_table\u201d\">\u300aVim\u4e09\u79cd\u5de5\u4f5c\u6a21\u5f0f\u300b\u4e00\u8282\u7ed9\u5927\u5bb6\u8be6\u7ec6\u4ecb\u7ecd\u4e86 Vim \u7684 3 \u79cd\u5de5\u4f5c\u6a21\u5f0f\uff0c\u672c\u8282\u6765\u5b66\u4e60\u5982\u4f55\u4f7f\u7528 Vim \u7f16\u8f91\u6587\u4ef6\u3002<\/p>\n<p> \u9996\u5148\u5b66\u4e60\u5982\u4f55\u4f7f\u7528 Vim \u6253\u5f00\u6587\u4ef6\u3002 <\/p>\n<h2> Vim \u6253\u5f00\u6587\u4ef6<\/h2>\n<p> \u4f7f\u7528 Vim \u6253\u5f00\u6587\u4ef6\u5f88\u7b80\u5355\uff0c\u4f8b\u5982\u5728\u547d\u4ee4\u884c\u6a21\u5f0f\u4e0b\u6253\u5f00\u4e00\u4e2a\u81ea\u5df1\u7f16\u5199\u7684\u6587\u4ef6 \/test\/vi.test\uff0c\u6253\u5f00\u65b9\u6cd5\u5982\u4e0b\uff1a <\/p>\n<p class=\"info-box\"> [root@itxdl ~]# vim \/test\/vi.test<\/p>\n<p> \u521a\u6253\u5f00\u6587\u4ef6\u65f6 Vim \u5904\u4e8e\u547d\u4ee4\u6a21\u5f0f\uff0c\u6b64\u65f6\u6587\u4ef6\u7684\u4e0b\u65b9\u4f1a\u663e\u793a\u6587\u4ef6\u7684\u4e00\u4e9b\u4fe1\u606f\uff0c\u5305\u62ec\u6587\u4ef6\u7684\u603b\u884c\u6570\u548c\u5b57\u7b26\u6570\uff0c\u4ee5\u53ca\u5f53\u524d\u5149\u6807\u6240\u5728\u7684\u4f4d\u7f6e\u7b49\uff0c\u6b64\u65f6\u53ef\u4ee5\u4f7f\u7528\u63d2\u5165\u547d\u4ee4\u8fdb\u5165\u8f93\u5165\u6a21\u5f0f\u5bf9\u6587\u4ef6\u8fdb\u884c\u7f16\u8f91\uff0c\u5982\u56fe 1 \u6240\u793a\u3002<br \/>\n <\/p>\n<div style=\"text-align: center\">\n <br \/> <br \/>\n <img decoding=\"async\" alt=\"\" src=\"http:\/\/c.biancheng.net\/uploads\/allimg\/181008\/2-1Q00Q50G13X.jpg\" class=\"aligncenter\"><br \/>\n <br \/> \u56fe 1 Vim \u6253\u5f00\u6587\u4ef6\n<\/div>\n<div>\n  &nbsp;\n<\/div>\n<p> \u9664\u6b64\u4e4b\u5916\uff0c\u6211\u4eec\u8fd8\u53ef\u4ee5\u5229\u7528\u4e0b\u8868\u4e2d\u6253\u5f00\u6587\u4ef6\u7684\u547d\u4ee4\u683c\u5f0f\uff0c\u9488\u5bf9\u7279\u5b9a\u60c5\u5f62\u4f7f\u7528\u9002\u5f53\u7684\u6253\u5f00\u65b9\u5f0f\uff0c\u53ef\u4ee5\u5927\u5927\u63d0\u9ad8\u6211\u4eec\u7684\u6548\u7387\u3002<\/p>\n<table>\n<caption>\n   \u8868 2&nbsp;Vim \u6253\u5f00\u6587\u4ef6\u7684\u5feb\u6377\u65b9\u6cd5<br \/>\n <\/caption>\n<tbody>\n<tr>\n<th> Vi \u4f7f\u7528\u7684\u9009\u9879<\/th>\n<th> \u8bf4 \u660e<\/th>\n<\/tr>\n<tr>\n<td> vim filename<\/td>\n<td> \u6253\u5f00\u6216\u65b0\u5efa\u4e00\u4e2a\u6587\u4ef6\uff0c\u5e76\u5c06\u5149\u6807\u7f6e\u4e8e\u7b2c\u4e00\u884c\u7684\u9996\u90e8<\/td>\n<\/tr>\n<tr>\n<td> vim -r filename<\/td>\n<td> \u6062\u590d\u4e0a\u6b21 vim \u6253\u5f00\u65f6\u5d29\u6e83\u7684\u6587\u4ef6<\/td>\n<\/tr>\n<tr>\n<td> vim -R filename<\/td>\n<td> \u628a\u6307\u5b9a\u7684\u6587\u4ef6\u4ee5\u53ea\u8bfb\u65b9\u5f0f\u653e\u5165 Vim \u7f16\u8f91\u5668\u4e2d<\/td>\n<\/tr>\n<tr>\n<td> vim + filename<\/td>\n<td> \u6253\u5f00\u6587\u4ef6\uff0c\u5e76\u5c06\u5149\u6807\u7f6e\u4e8e\u6700\u540e\u4e00\u884c\u7684\u9996\u90e8<\/td>\n<\/tr>\n<tr>\n<td> vi +n filename<\/td>\n<td> \u6253\u5f00\u6587\u4ef6\uff0c\u5e76\u5c06\u5149\u6807\u7f6e\u4e8e\u7b2c n \u884c\u7684\u9996\u90e8<\/td>\n<\/tr>\n<tr>\n<td> vi +\/pattern filename<\/td>\n<td> \u6253\u5e75\u6587\u4ef6\uff0c\u5e76\u5c06\u5149\u6807\u7f6e\u4e8e\u7b2c\u4e00\u4e2a\u4e0e pattern \u5339\u914d\u7684\u4f4d\u7f6e<\/td>\n<\/tr>\n<tr>\n<td> vi -c command filename<\/td>\n<td> \u5728\u5bf9\u6587\u4ef6\u8fdb\u884c\u7f16\u8f91\u524d\uff0c\u5148\u6267\u884c\u6307\u5b9a\u7684\u547d\u4ee4<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2> \u4f7f\u7528 Vim \u8fdb\u884c\u7f16\u8f91<\/h2>\n<p> \u540c\u6837\uff0cVim \u63d0\u4f9b\u4e86\u5927\u91cf\u7684\u7f16\u8f91\u5feb\u6377\u952e\uff0c\u4e3b\u8981\u53ef\u5206\u4e3a\u4ee5\u4e0b\u51e0\u7c7b\u3002<br \/>\n <\/p>\n<h4> Vim \u63d2\u5165\u6587\u672c<\/h4>\n<p> \u4ece\u547d\u4ee4\u6a21\u5f0f\u8fdb\u5165\u8f93\u5165\u6a21\u5f0f\u8fdb\u884c\u7f16\u8f91\uff0c\u53ef\u4ee5\u6309\u4e0b I\u3001i\u3001O\u3001o\u3001A\u3001a \u7b49\u952e\u6765\u5b8c\u6210\uff0c\u4f7f\u7528\u4e0d\u540c\u7684\u952e\uff0c\u5149\u6807\u6240\u5904\u7684\u4f4d\u7f6e\u4e0d\u540c\uff0c\u5982\u8868 3 \u6240\u793a\u3002<\/p>\n<table border=\"1\">\n<caption>\n   \u8868 3&nbsp;\u63d2\u5165\u6587\u672c<br \/>\n <\/caption>\n<tbody>\n<tr>\n<th> \u5feb\u6377\u952e<\/th>\n<th> \u529f\u80fd\u63cf\u8ff0<\/th>\n<\/tr>\n<tr>\n<td> i<\/td>\n<td> \u5728\u5f53\u524d\u5149\u6807\u6240\u5728\u4f4d\u7f6e\u63d2\u5165\u968f\u540e\u8f93\u5165\u7684\u6587\u672c\uff0c\u5149\u6807\u540e\u7684\u6587\u672c\u76f8\u5e94\u5411\u53f3\u79fb\u52a8<\/td>\n<\/tr>\n<tr>\n<td> I<\/td>\n<td> \u5728\u5149\u6807\u6240\u5728\u884c\u7684\u884c\u9996\u63d2\u5165\u968f\u540e\u8f93\u5165\u7684\u6587\u672c\uff0c\u884c\u9996\u662f\u8be5\u884c\u7684\u7b2c\u4e00\u4e2a\u975e\u7a7a\u767d\u5b57\u7b26\uff0c\u76f8\u5f53\u4e8e\u5149\u6807\u79fb\u52a8\u5230\u884c\u9996\u6267\u884c i \u547d\u4ee4<\/td>\n<\/tr>\n<tr>\n<td> o<\/td>\n<td> \u5728\u5149\u6807\u6240\u5728\u884c\u7684\u4e0b\u9762\u63d2\u5165\u65b0\u7684\u4e00\u884c\u3002\u5149\u6807\u505c\u5728\u7a7a\u884c\u9996\uff0c\u7b49\u5f85\u8f93\u5165\u6587\u672c<\/td>\n<\/tr>\n<tr>\n<td> O\uff08\u5927\u5199\uff09<\/td>\n<td> \u5728\u5149\u6807\u6240\u5728\u884c\u7684\u4e0a\u9762\u63d2\u5165\u65b0\u7684\u4e00\u884c\u3002\u5149\u6807\u505c\u5728\u7a7a\u884c\u7684\u884c\u9996\uff0c\u7b49\u5f85\u8f93\u5165\u6587\u672c<\/td>\n<\/tr>\n<tr>\n<td> a<\/td>\n<td> \u5728\u5f53\u524d\u5149\u6807\u6240\u5728\u4f4d\u7f6e\u4e4b\u540e\u63d2\u5165\u968f\u540e\u8f93\u5165\u7684\u6587\u672c<\/td>\n<\/tr>\n<tr>\n<td> A<\/td>\n<td> \u5728\u5149\u6807\u6240\u5728\u884c\u7684\u884c\u5c3e\u63d2\u5165\u968f\u540e\u8f93\u5165\u7684\u6587\u672c\uff0c\u76f8\u5f53\u4e8e\u5149\u6807\u79fb\u52a8\u5230\u884c\u5c3e\u518d\u6267\u884c a \u547d\u4ee4<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4> Vim \u67e5\u627e\u6587\u672c<\/h4>\n<table>\n<caption>\n   \u8868 4&nbsp;Vim \u67e5\u627e\u76ee\u6807\u6587\u672c<br \/>\n <\/caption>\n<tbody>\n<tr>\n<th> \u5feb\u6377\u952e<\/th>\n<th> \u529f\u80fd\u63cf\u8ff0<\/th>\n<\/tr>\n<tr>\n<td> \/abc<\/td>\n<td> \u4ece\u5149\u6807\u6240\u5728\u4f4d\u7f6e\u5411\u524d\u67e5\u627e\u5b57\u7b26\u4e32 abc<\/td>\n<\/tr>\n<tr>\n<td> \/^abc<\/td>\n<td> \u67e5\u627e\u4ee5 abc \u4e3a\u884c\u9996\u7684\u884c<\/td>\n<\/tr>\n<tr>\n<td> \/abc$<\/td>\n<td> \u67e5\u627e\u4ee5 abc \u4e3a\u884c\u5c3e\u7684\u884c<\/td>\n<\/tr>\n<tr>\n<td> ?abc<\/td>\n<td> \u4ece\u5149\u6807\u6240\u5728\u4e3a\u4e3b\u5411\u540e\u67e5\u627e\u5b57\u7b26\u4e32 abc<\/td>\n<\/tr>\n<tr>\n<td> n<\/td>\n<td> \u5411\u540c\u4e00\u65b9\u5411\u91cd\u590d\u4e0a\u6b21\u7684\u67e5\u627e\u6307\u4ee4<\/td>\n<\/tr>\n<tr>\n<td> N<\/td>\n<td> \u5411\u76f8\u53cd\u65b9\u5411\u91cd\u590d\u4e0a\u6b21\u7684\u67e5\u627e\u6307\u5b9a<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u4f8b\u5982\uff0c\u5728 \/etc\/passwd.vi \u6587\u4ef6\u4e2d\u67e5\u627e\u5b57\u7b26\u4e32 \"root\"\uff0c\u5219\u8fd0\u884c\u547d\u4ee4\u5982\u56fe 5 \u6240\u793a\u3002 <\/p>\n<div style=\"text-align: center\">\n <br \/> <br \/>\n <img decoding=\"async\" alt=\"\" src=\"http:\/\/c.biancheng.net\/uploads\/allimg\/181008\/2-1Q00Q6360L18.jpg\" class=\"aligncenter\"><br \/>\n <br \/> \u56fe 5 \u4f7f\u7528 Vim \u8fdb\u884c\u67e5\u627e\n<\/div>\n<p> \u5982\u679c\u5728\u6587\u4ef6\u4e2d\u5e76\u6ca1\u6709\u627e\u5230\u6240\u8981\u67e5\u627e\u7684\u5b57\u7b26\u4e32\uff0c\u5219\u5728\u6587\u4ef6\u5e95\u90e8\u4f1a\u51fa\u73b0 \"Pattern not found\" \u63d0\u793a\uff0c\u5982\u56fe 6 \u6240\u793a\u3002<br \/>\n <\/p>\n<div style=\"text-align: center\">\n <br \/> <br \/>\n <img decoding=\"async\" alt=\"\" src=\"http:\/\/c.biancheng.net\/uploads\/allimg\/181008\/2-1Q00Q63630S1.jpg\" class=\"aligncenter\"><br \/>\n <br \/> \u56fe 6 \u672a\u67e5\u627e\u5230\u6307\u5b9a\u5b57\u7b26\u4e32\u7684\u63d0\u793a\n<\/div>\n<p> \u5728\u67e5\u627e\u8fc7\u7a0b\u4e2d\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u8981\u67e5\u627e\u7684\u5b57\u7b26\u4e32\u662f\u4e25\u683c\u533a\u5206\u5927\u5c0f\u5199\u7684\uff0c\u5982\u67e5\u627e \"shenchao\" \u548c \"ShenChao\" \u4f1a\u5f97\u5230\u4e0d\u540c\u7684\u7ed3\u679c\u3002<br \/>\n <\/p>\n<p class=\"info-box\"> \u5982\u679c\u60f3\u5ffd\u7565\u5927\u5c0f\u5199\uff0c\u5219\u8f93\u5165\u547d\u4ee4 \":set ic\"\uff1b\u8c03\u6574\u56de\u6765\u8f93\u5165\":set noic\"\u3002<\/p>\n<p> \u5982\u679c\u5728\u5b57\u7b26\u4e32\u4e2d\u51fa\u73b0\u7279\u6b8a\u7b26\u53f7\uff0c\u5219\u9700\u8981\u52a0\u4e0a\u8f6c\u4e49\u5b57\u7b26 \"\\\"\u3002\u5e38\u89c1\u7684\u7279\u6b8a\u7b26\u53f7\u6709 \\\u3001*\u3001?\u3001$ \u7b49\u3002\u5982\u679c\u51fa\u73b0\u8fd9\u4e9b\u5b57\u7b26\uff0c\u4f8b\u5982\uff0c\u8981\u67e5\u627e\u5b57\u7b26\u4e32 \"10$\"\uff0c\u5219\u9700\u8981\u5728\u547d\u4ee4\u6a21\u5f0f\u4e2d\u8f93\u5165 \"\/10\\$\"\u3002<br \/>\n <\/p>\n<h4> Vim \u66ff\u6362\u6587\u672c<\/h4>\n<table>\n<caption>\n   \u8868 7&nbsp;Vim\u66ff\u6362\u6587\u672c<br \/>\n <\/caption>\n<tbody>\n<tr>\n<th> \u5feb\u6377\u952e<\/th>\n<th> \u529f\u80fd\u63cf\u8ff0<\/th>\n<\/tr>\n<tr>\n<td> r<\/td>\n<td> \u66ff\u6362\u5149\u6807\u6240\u5728\u4f4d\u7f6e\u7684\u5b57\u7b26<\/td>\n<\/tr>\n<tr>\n<td> R<\/td>\n<td> \u4ece\u5149\u6807\u6240\u5728\u4f4d\u7f6e\u5f00\u59cb\u66ff\u6362\u5b57\u7b26\uff0c\u5176\u8f93\u5165\u5185\u5bb9\u4f1a\u8986\u76d6\u6389\u540e\u9762\u7b49\u957f\u7684\u6587\u672c\u5185\u5bb9\uff0c\u6309\u201cEsc\u201d\u53ef\u4ee5\u7ed3\u675f<\/td>\n<\/tr>\n<tr>\n<td> :s\/a1\/a2\/g<\/td>\n<td> \u5c06\u5f53\u524d\u5149\u6807\u6240\u5728\u884c\u4e2d\u7684\u6240\u6709 a1 \u7528 a2 \u66ff\u6362<\/td>\n<\/tr>\n<tr>\n<td> :n1,n2s\/a1\/a2\/g<\/td>\n<td> \u5c06\u6587\u4ef6\u4e2d n1 \u5230 n2 \u884c\u4e2d\u6240\u6709 a1 \u90fd\u7528 a2 \u66ff\u6362<\/td>\n<\/tr>\n<tr>\n<td> :g\/a1\/a2\/g<\/td>\n<td> \u5c06\u6587\u4ef6\u4e2d\u6240\u6709\u7684 a1 \u90fd\u7528 a2 \u66ff\u6362<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u4f8b\u5982\uff0c\u8981\u5c06\u67d0\u6587\u4ef6\u4e2d\u6240\u6709\u7684 \"root\" \u66ff\u6362\u4e3a \"liudehua\"\uff0c\u5219\u6709\u4e24\u79cd\u8f93\u5165\u547d\u4ee4\uff0c\u5206\u522b\u4e3a\uff1a <\/p>\n<p class=\"info-box\"> :1, $s\/root\/liudehua\/g<br \/> \u6216<br \/> :%s\/root\/liudehua\/g<\/p>\n<p> \u4e0a\u8ff0\u547d\u4ee4\u662f\u5728\u7f16\u8f91\u6a21\u5f0f\u4e0b\u64cd\u4f5c\u7684\uff0c\u8868\u793a\u7684\u662f\u4ece\u7b2c\u4e00\u884c\u5230\u6700\u540e\u4e00\u884c\uff0c\u5373\u5168\u6587\u67e5\u627e \"root\"\uff0c\u7136\u540e\u66ff\u6362\u6210 \"liudehua\"\u3002<\/p>\n<p> \u5982\u679c\u521a\u624d\u7684\u547d\u4ee4\u53d8\u6210&nbsp;<br \/>\n<code style=\"font-size: 14px\">:10,20 s\/root\/liudehua\/g<\/code>\uff0c\u5219\u53ea\u66ff\u6362\u4ece\u7b2c 10 \u884c\u5230\u7b2c 20 \u884c\u7684 \"root\"\u3002<br \/>\n <\/p>\n<h4> Vim\u5220\u9664\u6587\u672c<\/h4>\n<table>\n<caption>\n   \u8868 8&nbsp;Vim \u5220\u9664\u6587\u672c\u5feb\u6377\u952e<br \/>\n <\/caption>\n<tbody>\n<tr>\n<th> \u5feb\u6377\u952e<\/th>\n<th> \u529f\u80fd\u63cf\u8ff0<\/th>\n<\/tr>\n<tr>\n<td> x<\/td>\n<td> \u5220\u9664\u5149\u6807\u6240\u5728\u4f4d\u7f6e\u7684\u5b57\u7b26<\/td>\n<\/tr>\n<tr>\n<td> dd<\/td>\n<td> \u5220\u9664\u5149\u6807\u6240\u5728\u884c<\/td>\n<\/tr>\n<tr>\n<td> ndd<\/td>\n<td> \u5220\u9664\u5f53\u524d\u884c\uff08\u5305\u62ec\u6b64\u884c\uff09\u540e n \u884c\u6587\u672c<\/td>\n<\/tr>\n<tr>\n<td> dG<\/td>\n<td> \u5220\u9664\u5149\u6807\u6240\u5728\u884c\u4e00\u76f4\u5230\u6587\u4ef6\u672b\u5c3e\u7684\u6240\u6709\u5185\u5bb9<\/td>\n<\/tr>\n<tr>\n<td> D<\/td>\n<td> \u5220\u9664\u5149\u6807\u4f4d\u7f6e\u5230\u884c\u5c3e\u7684\u5185\u5bb9<\/td>\n<\/tr>\n<tr>\n<td> :a1,a2d<\/td>\n<td> \u51fd\u6570\u4ece a1 \u884c\u5230 a2 \u884c\u7684\u6587\u672c\u5185\u5bb9<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p class=\"info-box\"> \u6ce8\u610f\uff0c\u88ab\u5220\u9664\u7684\u5185\u5bb9\u5e76\u6ca1\u6709\u771f\u6b63\u5220\u9664\uff0c\u90fd\u653e\u5728\u4e86\u526a\u8d34\u677f\u4e2d\u3002\u5c06\u5149\u6807\u79fb\u52a8\u5230\u6307\u5b9a\u4f4d\u7f6e\u5904\uff0c\u6309\u4e0b \"p\" \u952e\uff0c\u5c31\u53ef\u4ee5\u5c06\u521a\u624d\u5220\u9664\u7684\u5185\u5bb9\u53c8\u7c98\u8d34\u5230\u6b64\u5904\u3002<\/p>\n<h4> Vim\u590d\u5236\u548c\u7c98\u8d34\u6587\u672c<\/h4>\n<table>\n<caption>\n   \u8868 9&nbsp;Vim \u590d\u5236\u6587\u672c<br \/>\n <\/caption>\n<tbody>\n<tr>\n<th> \u5feb\u6377\u952e<\/th>\n<th> \u529f\u80fd\u63cf\u8ff0<\/th>\n<\/tr>\n<tr>\n<td> p<\/td>\n<td> \u5c06\u526a\u8d34\u677f\u4e2d\u7684\u5185\u5bb9\u7c98\u8d34\u5230\u5149\u6807\u540e<\/td>\n<\/tr>\n<tr>\n<td> P\uff08\u5927\u5199\uff09<\/td>\n<td> \u5c06\u526a\u8d34\u677f\u4e2d\u7684\u5185\u5bb9\u7c98\u8d34\u5230\u5149\u6807\u524d<\/td>\n<\/tr>\n<tr>\n<td> y<\/td>\n<td> \u590d\u5236\u5df2\u9009\u4e2d\u7684\u6587\u672c\u5230\u526a\u8d34\u677f<\/td>\n<\/tr>\n<tr>\n<td> yy<\/td>\n<td> \u5c06\u5149\u6807\u6240\u5728\u884c\u590d\u5236\u5230\u526a\u8d34\u677f\uff0c\u6b64\u547d\u4ee4\u524d\u53ef\u4ee5\u52a0\u6570\u5b57 n\uff0c\u53ef\u590d\u5236\u591a\u884c<\/td>\n<\/tr>\n<tr>\n<td> yw<\/td>\n<td> \u5c06\u5149\u6807\u4f4d\u7f6e\u7684\u5355\u8bcd\u590d\u5236\u5230\u526a\u8d34\u677f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4> Vim\u5176\u4ed6\u5e38\u7528\u5feb\u6377\u952e<\/h4>\n<p> \u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u53ef\u80fd\u9700\u8981\u628a\u4e24\u884c\u8fdb\u884c\u8fde\u63a5\u3002\u6bd4\u5982\u8bf4\uff0c\u4e0b\u9762\u7684\u6587\u4ef6\u4e2d\u6709\u4e24\u884c\u6587\u672c\uff0c\u73b0\u5728\u9700\u8981\u5c06\u5176\u5408\u5e76\u6210\u4e00\u884c\uff08\u5b9e\u9645\u4e0a\u5c31\u662f\u5c06\u4e24\u884c\u95f4\u7684\u6362\u884c\u7b26\u53bb\u6389\uff09\u3002\u53ef\u4ee5\u76f4\u63a5\u5728\u547d\u4ee4\u6a21\u5f0f\u4e2d\u6309\u4e0b \"J\" \u952e\uff0c\u6309\u4e0b\u524d\u540e\u5982\u56fe 10 \u6240\u793a\u3002<br \/>\n <\/p>\n<div style=\"text-align: center\">\n <br \/> <br \/>\n <img decoding=\"async\" alt=\"\" src=\"http:\/\/c.biancheng.net\/uploads\/allimg\/181008\/2-1Q00Q640323F.jpg\" class=\"aligncenter\"><br \/>\n <br \/> \u56fe 10 \u6309\u4e0b \"J\" \u952e\u524d\u540e\n<\/div>\n<p> \u5982\u679c\u4e0d\u5c0f\u5fc3\u8bef\u5220\u9664\u4e86\u6587\u4ef6\u5185\u5bb9\uff0c\u5219\u53ef\u4ee5\u901a\u8fc7 \"u\" \u952e\u6765\u64a4\u9500\u521a\u624d\u6267\u884c\u7684\u547d\u4ee4\u3002\u5982\u679c\u8981\u64a4\u9500\u521a\u624d\u7684\u591a\u6b21\u64cd\u4f5c\uff0c\u53ef\u4ee5\u591a\u6309\u51e0\u6b21 \"u\" \u952e\u3002<br \/>\n <\/p>\n<h2> Vim \u4fdd\u5b58\u9000\u51fa\u6587\u672c<\/h2>\n<p> Vim \u7684\u4fdd\u5b58\u548c\u9000\u51fa\u662f\u5728\u7f16\u8f91\u6a21\u5f0f\u4e2d\u8fdb\u884c\u7684\uff0c\u5176\u5e38\u7528\u547d\u4ee4\u5982\u4e0b\u8868\u6240\u793a\u3002<\/p>\n<table border=\"1\">\n<caption>\n   \u8868 11 Vim \u5e38\u7528\u4fdd\u5b58\u9000\u51fa\u547d\u4ee4<br \/>\n <\/caption>\n<tbody>\n<tr>\n<th> \u547d\u4ee4<\/th>\n<th> \u529f\u80fd\u63cf\u8ff0<\/th>\n<\/tr>\n<tr>\n<td> :wq<\/td>\n<td> \u4fdd\u5b58\u5e76\u9000\u51fa Vim \u7f16\u8f91\u5668<\/td>\n<\/tr>\n<tr>\n<td> :wq!<\/td>\n<td> \u4fdd\u5b58\u5e76\u5f3a\u5236\u9000\u51fa Vim \u7f16\u8f91\u5668<\/td>\n<\/tr>\n<tr>\n<td> :q<\/td>\n<td> \u4e0d\u4fdd\u5b58\u5c31\u9000\u51fa Vim \u7f16\u8f91\u5668<\/td>\n<\/tr>\n<tr>\n<td> :q!<\/td>\n<td> \u4e0d\u4fdd\u5b58\uff0c\u4e14\u5f3a\u5236\u9000\u51fa Vim \u7f16\u8f91\u5668<\/td>\n<\/tr>\n<tr>\n<td> :w<\/td>\n<td> \u4fdd\u5b58\u4f46\u662f\u4e0d\u9000\u51fa Vim \u7f16\u8f91\u5668<\/td>\n<\/tr>\n<tr>\n<td> :w!<\/td>\n<td> \u5f3a\u5236\u4fdd\u5b58\u6587\u672c<\/td>\n<\/tr>\n<tr>\n<td> :w filename<\/td>\n<td> \u53e6\u5b58\u5230&nbsp;filename \u6587\u4ef6<\/td>\n<\/tr>\n<tr>\n<td> x\uff01<\/td>\n<td> \u4fdd\u5b58\u6587\u672c\uff0c\u5e76\u9000\u51fa Vim \u7f16\u8f91\u5668\uff0c\u66f4\u901a\u7528\u7684\u4e00\u4e2a vim \u547d\u4ee4<\/td>\n<\/tr>\n<tr>\n<td> ZZ<\/td>\n<td> \u76f4\u63a5\u9000\u51fa Vim \u7f16\u8f91\u5668<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\"w!\" \u548c \"wq!\" \u7b49\u7c7b\u4f3c\u7684\u6307\u4ee4\uff0c\u901a\u5e38\u7528\u4e8e\u5bf9\u6587\u4ef6\u6ca1\u6709\u5199\u6743\u9650\u7684\u65f6\u5019\uff08\u663e\u793a readonly\uff0c\u5982\u56fe 12 \u6240\u793a\uff09\uff0c\u4f46\u5982\u679c\u4f60\u662f\u6587\u4ef6\u7684\u6240\u6709\u8005\u6216\u8005 root \u7528\u6237\uff0c\u5c31\u53ef\u4ee5\u5f3a\u5236\u6267\u884c\u3002<br \/>\n <\/p>\n<div style=\"text-align: center\">\n <br \/> <br \/>\n <img decoding=\"async\" alt=\"\" src=\"http:\/\/c.biancheng.net\/uploads\/allimg\/181008\/2-1Q00Q643042W.jpg\" class=\"aligncenter\"><br \/>\n <br \/> \u56fe 12 \u53ea\u8bfb\u6587\u4ef6\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u300aVim\u4e09\u79cd\u5de5\u4f5c\u6a21\u5f0f\u300b\u4e00\u8282\u7ed9\u5927\u5bb6\u8be6\u7ec6\u4ecb\u7ecd\u4e86 Vim \u7684 3 \u79cd\u5de5\u4f5c\u6a21\u5f0f\uff0c\u672c\u8282\u6765\u5b66\u4e60\u5982\u4f55\u4f7f\u7528 Vim \u7f16\u8f91\u6587\u4ef6\u3002 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[],"class_list":["post-10079","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/10079","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/comments?post=10079"}],"version-history":[{"count":0,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/10079\/revisions"}],"wp:attachment":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/media?parent=10079"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/categories?post=10079"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/tags?post=10079"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}