{"id":24,"date":"2021-01-04T13:03:31","date_gmt":"2021-01-04T05:03:31","guid":{"rendered":"https:\/\/explause.com\/?p=24"},"modified":"2021-01-04T13:03:31","modified_gmt":"2021-01-04T05:03:31","slug":"vim%e7%9a%84%e7%ae%80%e5%8d%95%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/devdoge.org\/?p=24","title":{"rendered":"vim\u7684\u7b80\u5355\u4f7f\u7528\u65b9\u6cd5"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u5f88\u591a\u65b0\u624b\u90fd\u4e0d\u592a\u6e05\u695avim\u7684\u4f7f\u7528\u65b9\u6cd5\uff0c\u6211\u4e00\u5f00\u59cb\u4e5f\u662f\uff0c\u5176\u5b9e\u6ca1\u90a3\u4e48\u590d\u6742\uff0c\u53ea\u8981\u4f1a\u6309\u51e0\u4e2a\u6309\u94ae\u5c31\u53ef\u4ee5\u5566\uff01<\/p>\n\n\n<p class=\"wp-block-paragraph\">\u5728\u5f88\u591aLinux\u7cfb\u7edf\u4e0a\uff0cvi\u547d\u4ee4\u5176\u5b9e\u8c03\u7528\u7684\u662fvim\uff0c\u771f\u6b63\u7684vi\u5176\u5b9e\u5f88\u96be\u7528\u3002<\/p>\n\n\n<p class=\"wp-block-paragraph\">\u63a7\u5236\u53f0\u8f93\u5165vi\uff0c\u540e\u9762\u8ddf\u7740\u4e00\u4e2a\u6587\u4ef6\u7684\u8def\u5f84\uff0c\u5982\u679c\u6587\u4ef6\u4e0d\u5b58\u5728\u5c31\u65b0\u5efa\u4e00\u4e2a\uff08\u5f53\u7136\u662f\u7f16\u8f91\u4e4b\u540e\uff09\uff1a<\/p>\n\n\n<pre class=\"wp-block-code\"><code>vi example.txt<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph\">\u7528vim\u6253\u5f00example.txt\u6587\u4ef6\uff0c\u5982\u679c\u8be5\u6587\u4ef6\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u4e0d\u5b58\u5728\uff0c\u7f16\u8f91\u540e\u5c31\u65b0\u5efa\u4e00\u4e2a\u6587\u4ef6\u540d\u5b57\u53ebexample.txt<\/p>\n\n\n<p class=\"wp-block-paragraph\">\u6309\u4e00\u4e0bi\u952e\u8fdb\u5165\u7f16\u8f91\u6a21\u5f0f\uff1a<\/p>\n\n\n<pre class=\"wp-block-code\"><code>i<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph\">\u4fdd\u5b58\u9000\u51favim\uff1a<\/p>\n\n\n<pre class=\"wp-block-code\"><code>:wq<\/code><\/pre>\n\n\n<pre class=\"wp-block-verse\">\u4e0a\u9762\u7684\u547d\u4ee4\u610f\u601d\u662f\uff1a<strong>\u5148\u6309\u4e00\u4e0bEsc\uff0c\u6309shift+; \u540e\u6309\u4e00\u4e0bw\u952e\u548cq\u952e<\/strong>\u3002\nw\u662f\u4fdd\u5b58\u7684\u610f\u601d\uff0cq\u662f\u9000\u51fa\uff0c\u90fd\u53ef\u4ee5\u5355\u72ec\u4f7f\u7528\u3002<\/pre>\n\n\n<p class=\"wp-block-paragraph\"><strong>vi\u7684\u547d\u4ee4\u4f7f\u7528\u524d\u6700\u597d\u6309\u4e00\u4e0bEsc\u952e\uff01\uff01\uff01<\/strong><\/p>\n\n\n<pre class=\"wp-block-verse\">\u6ce8\u610f\uff1a\u5192\u53f7\u662f\u82f1\u6587\u91cc\u7684\u5192\u53f7\uff08\u534a\u89d2\uff09\uff0c\u4e0d\u662f\u4e2d\u6587\u7684\u5192\u53f7\uff08\u5168\u89d2\uff09\uff01\uff01\n\u4e24\u4e2a\u662f\u4e0d\u4e00\u6837\u7684\uff01<\/pre>\n\n\n<pre class=\"wp-block-code\"><code>\u82f1\u6587\u7684\u5192\u53f7 :\n\u4e2d\u6587\u7684\u5192\u53f7 \uff1a<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph\">\u4e0d\u4fdd\u5b58\u9000\u51fa\uff1a<\/p>\n\n\n<pre class=\"wp-block-code\"><code>:q!<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph\">\u641c\u7d22\u884c\u53f7\uff1a<\/p>\n\n\n<pre class=\"wp-block-code\"><code>:1<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph\">\u6570\u5b57\u4e3a\u60f3\u8981\u53bb\u7684\u884c\u53f7\u3002<\/p>\n\n\n<p class=\"wp-block-paragraph\">\u641c\u7d22\u6587\u672c\uff1a<\/p>\n\n\n<pre class=\"wp-block-code\"><code>\/FindPattern<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph\">\u659c\u6760\u540e\u9762\u8ddf\u7740\u60f3\u8981\u641c\u7d22\u7684\u6587\u672c\u3002<\/p>\n\n\n<p class=\"wp-block-paragraph\">\u5220\u9664\u4e00\u4e2a\u5b57\u7b26\uff08\u5149\u6807\u5de6\u8fb9\u7684\u90a3\u4e2a\uff09\uff1a<\/p>\n\n\n<pre class=\"wp-block-code\"><code>d<\/code><\/pre>\n\n\n<p class=\"wp-block-paragraph\">\u6309\u4e00\u4e0bd\u952e\u5c31\u884c\u3002<\/p>\n\n\n<p class=\"wp-block-paragraph\">\u5220\u9664\u4e00\u884c\uff1a<\/p>\n\n\n<pre class=\"wp-block-code\"><code>dd<\/code><\/pre>\n\n\n<pre class=\"wp-block-verse\">\u6ce8\u610f\u5343\u4e07\u8bb0\u5f97\u6309\u4e86\u591a\u5c11\u4e0b\uff0c<strong>\u5f88\u5bb9\u6613\u8bef\u5220<\/strong>\uff01\n<strong>\u8981\u662f\u6309\u7740\u4e0d\u653e\u5c31\u5168\u90e8\u5220\u5149\u5149\uff01\uff01<\/strong><\/pre>\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>vim\u6ca1\u6709\u4f20\u8bf4\u7684\u90a3\u4e48\u590d\u6742\uff0c\u53ea\u8981\u4f1a\u6309\u56fa\u5b9a\u7684\u51e0\u4e2a\u6309\u94ae\u5c31\u80fd\u64cd\u4f5c\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[14,19],"class_list":["post-24","post","type-post","status-publish","format-standard","hentry","category-opt","tag-linux","tag-vi"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6}},"_links":{"self":[{"href":"https:\/\/devdoge.org\/index.php?rest_route=\/wp\/v2\/posts\/24","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devdoge.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devdoge.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devdoge.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/devdoge.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=24"}],"version-history":[{"count":0,"href":"https:\/\/devdoge.org\/index.php?rest_route=\/wp\/v2\/posts\/24\/revisions"}],"wp:attachment":[{"href":"https:\/\/devdoge.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=24"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devdoge.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=24"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devdoge.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=24"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}