{"id":101962,"date":"2026-09-07T23:08:56","date_gmt":"2026-09-07T15:08:56","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/101962.html"},"modified":"2026-09-07T23:08:56","modified_gmt":"2026-09-07T15:08:56","slug":"linux%e5%ae%9e%e6%88%98%ef%bd%9cvim%e7%bc%96%e8%be%91%e5%99%a8%e5%85%a8%e5%a5%97%e5%bf%ab%e6%8d%b7%e9%94%ae-shell%e9%87%8d%e5%ae%9a%e5%90%91%e8%af%a6%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/101962.html","title":{"rendered":"Linux\u5b9e\u6218\uff5cVim\u7f16\u8f91\u5668\u5168\u5957\u5feb\u6377\u952e + Shell\u91cd\u5b9a\u5411\u8be6\u89e3"},"content":{"rendered":"<h2>Linux Vim\u6587\u672c\u7f16\u8f91 &#043; \u91cd\u5b9a\u5411\u5b9e\u6218\u7b14\u8bb0&#xff08;CentOS7&#xff09;<\/h2>\n<p>\u6458\u8981&#xff1a;\u672c\u6587\u6574\u7406CentOS7\u4e0bvim\u7f16\u8f91\u5668\u5e38\u7528\u5feb\u6377\u952e\u3001\u6587\u672c\u7f16\u8f91\u64cd\u4f5c\u4ee5\u53cashell\u8f93\u5165\u8f93\u51fa\u91cd\u5b9a\u5411\u5168\u5957\u5b9e\u6218\u3002\u5168\u90e8\u793a\u4f8b\u547d\u4ee4\u53ef\u76f4\u63a5\u590d\u5236\u8fd0\u884c&#xff0c;\u533a\u5206\u8986\u76d6\/\u8ffd\u52a0\u3001\u6807\u51c6\u8f93\u51fa\/\u9519\u8bef\u8f93\u51fa&#xff0c;\u8bb2\u89e3\/dev\/null\u9ed1\u6d1e\u8bbe\u5907\u3001here\u2011doc\u3001tee\u5de5\u5177&#xff0c;\u6807\u6ce8\u65b0\u624b\u9ad8\u9891\u8e29\u5751\u70b9&#xff0c;\u9002\u5408CSDN\u3001\u8bed\u96c0\u5b9e\u9a8c\u7b14\u8bb0\u4e0e\u9762\u8bd5\u590d\u4e60\u3002<\/p>\n<h2>\u4e00\u3001Vim\u7f16\u8f91\u5668<\/h2>\n<h3>\u5b89\u88c5vim<\/h3>\n<p># CentOS7\u5b89\u88c5vim<br \/>\nyum install vim<\/p>\n<h3>\u666e\u901a\u6a21\u5f0f \u2014 \u5149\u6807\u5b9a\u4f4d<\/h3>\n<p>\u6253\u5f00vim\u9ed8\u8ba4\u8fdb\u5165\u666e\u901a\u6a21\u5f0f&#xff0c;\u4e0b\u9762\u5feb\u6377\u952e\u5747\u5728\u666e\u901a\u6a21\u5f0f\u6267\u884c<\/p>\n<table>\n<tr>\u6309\u952e\u4f5c\u7528<\/tr>\n<tbody>\n<tr>\n<td>gg<\/td>\n<td>\u8df3\u8f6c\u5230\u6587\u6863\u7b2c\u4e00\u884c<\/td>\n<\/tr>\n<tr>\n<td>G<\/td>\n<td>\u8df3\u8f6c\u5230\u6587\u6863\u6700\u540e\u4e00\u884c<\/td>\n<\/tr>\n<tr>\n<td>w<\/td>\n<td>\u5411\u540e\u79fb\u52a8\u5230\u4e0b\u4e00\u4e2a\u5355\u8bcd\u5f00\u5934<\/td>\n<\/tr>\n<tr>\n<td>e<\/td>\n<td>\u5411\u540e\u79fb\u52a8\u5230\u4e0b\u4e00\u4e2a\u5355\u8bcd\u672b\u5c3e<\/td>\n<\/tr>\n<tr>\n<td>b<\/td>\n<td>\u5411\u524d\u79fb\u52a8\u5230\u4e0a\u4e00\u4e2a\u5355\u8bcd\u5f00\u5934<\/td>\n<\/tr>\n<tr>\n<td>^ \/ 0<\/td>\n<td>\u8df3\u8f6c\u5230\u5f53\u524d\u884c\u9996<\/td>\n<\/tr>\n<tr>\n<td>$<\/td>\n<td>\u8df3\u8f6c\u5230\u5f53\u524d\u884c\u5c3e<\/td>\n<\/tr>\n<tr>\n<td>(<\/td>\n<td>\u8df3\u8f6c\u5230\u4e0a\u4e00\u4e2a\u53e5\u5b50\u5934\u90e8<\/td>\n<\/tr>\n<tr>\n<td>)<\/td>\n<td>\u8df3\u8f6c\u5230\u4e0b\u4e00\u4e2a\u53e5\u5b50\u5c3e\u90e8<\/td>\n<\/tr>\n<tr>\n<td>{<\/td>\n<td>\u8df3\u8f6c\u5230\u4e0a\u4e00\u4e2a\u81ea\u7136\u6bb5\u5f00\u5934<\/td>\n<\/tr>\n<tr>\n<td>}<\/td>\n<td>\u8df3\u8f6c\u5230\u4e0b\u4e00\u4e2a\u81ea\u7136\u6bb5\u5f00\u5934<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>\u6587\u672c\u9009\u4e2d&#xff08;\u53ef\u89c6\u6a21\u5f0f&#xff09;<\/h4>\n<p>v       # \u5b57\u7b26\u9009\u4e2d&#xff0c;\u6309\u65b9\u5411\u952e\u9009\u4e2d\u6587\u672c<br \/>\nV       # \u884c\u9009\u4e2d&#xff0c;\u76f4\u63a5\u9009\u4e2d\u6574\u884c<\/p>\n<h3>\u666e\u901a\u6a21\u5f0f \u2192 \u63d2\u5165\u6a21\u5f0f&#xff08;\u7f16\u8f91\u6587\u672c&#xff09;<\/h3>\n<table>\n<tr>\u6309\u952e\u529f\u80fd\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>i<\/td>\n<td>\u5728\u5f53\u524d\u5149\u6807\u4f4d\u7f6e\u63d2\u5165<\/td>\n<\/tr>\n<tr>\n<td>I<\/td>\n<td>\u8df3\u8f6c\u5230\u884c\u9996&#xff0c;\u8fdb\u5165\u63d2\u5165\u6a21\u5f0f<\/td>\n<\/tr>\n<tr>\n<td>a<\/td>\n<td>\u5728\u5149\u6807\u540e\u9762\u8ffd\u52a0\u5b57\u7b26<\/td>\n<\/tr>\n<tr>\n<td>A<\/td>\n<td>\u8df3\u8f6c\u5230\u884c\u672b\u5c3e&#xff0c;\u8fdb\u5165\u8ffd\u52a0\u6a21\u5f0f<\/td>\n<\/tr>\n<tr>\n<td>o<\/td>\n<td>\u5728\u5f53\u524d\u884c\u4e0b\u65b9\u65b0\u5f00\u4e00\u884c\u5e76\u8fdb\u5165\u63d2\u5165\u6a21\u5f0f<\/td>\n<\/tr>\n<tr>\n<td>O<\/td>\n<td>\u5728\u5f53\u524d\u884c\u4e0a\u65b9\u65b0\u5f00\u4e00\u884c\u5e76\u8fdb\u5165\u63d2\u5165\u6a21\u5f0f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u666e\u901a\u6a21\u5f0f \u2014 \u5220\u9664\u64cd\u4f5c<\/h3>\n<p>x       # \u5220\u9664\u5149\u6807\u5904\u5355\u4e2a\u5b57\u7b26&#xff1b;5x \u5220\u9664\u5f80\u540e5\u4e2a\u5b57\u7b26<br \/>\nX       # \u5220\u9664\u5149\u6807\u524d\u9762\u4e00\u4e2a\u5b57\u7b26<\/p>\n<p>dw      # \u5220\u9664\u4e00\u4e2a\u5355\u8bcd&#xff1b;d5w \u5220\u9664\u5411\u540e5\u4e2a\u5355\u8bcd<br \/>\nd3b     # \u5220\u9664\u5411\u524d3\u4e2a\u5355\u8bcd<br \/>\nd$      # \u4ece\u5149\u6807\u5220\u9664\u5230\u884c\u672b\u5c3e<br \/>\nD       # \u7b49\u4ef7 d$&#xff0c;\u4ece\u5149\u6807\u5220\u9664\u5230\u884c\u5c3e<\/p>\n<p>\u26a0\ufe0f\u6ce8\u610f&#xff1a;\u5220\u9664\u5185\u5bb9\u4f1a\u5b58\u5230vim\u7f13\u51b2\u533a&#xff0c;\u53ef\u4ee5\u7c98\u8d34\u3002<\/p>\n<h3>\u64a4\u9500\u56de\u9000<\/h3>\n<p>u       # \u64a4\u9500\u4e0a\u4e00\u6b21\u64cd\u4f5c<br \/>\nU       # \u64a4\u9500\u5f53\u524d\u884c\u5168\u90e8\u4fee\u6539<\/p>\n<h3>\u666e\u901a\u6a21\u5f0f \u2014 \u4fee\u6539\u64cd\u4f5c&#xff08;\u5220\u9664\u540e\u76f4\u63a5\u8fdb\u5165\u63d2\u5165\u6a21\u5f0f&#xff09;<\/h3>\n<p>s       # \u5220\u9664\u5f53\u524d\u5149\u6807\u5b57\u7b26&#xff0c;\u8fdb\u5165\u63d2\u5165\u6a21\u5f0f<br \/>\nS       # \u5220\u9664\u6574\u884c\u5185\u5bb9&#xff0c;\u8fdb\u5165\u63d2\u5165\u6a21\u5f0f<\/p>\n<p>cw      # \u5220\u9664\u4e00\u4e2a\u5355\u8bcd&#xff0c;\u76f4\u63a5\u8fdb\u5165\u7f16\u8f91<br \/>\nC       # \u4ece\u5149\u6807\u5220\u9664\u5230\u884c\u5c3e&#xff0c;\u8fdb\u5165\u63d2\u5165\u6a21\u5f0f<\/p>\n<h3>\u666e\u901a\u6a21\u5f0f \u2014 \u5b57\u7b26\u66ff\u6362<\/h3>\n<p>r       # \u66ff\u6362**\u5355\u4e2a\u5b57\u7b26**&#xff0c;\u66ff\u6362\u5b8c\u6210\u76f4\u63a5\u56de\u5230\u666e\u901a\u6a21\u5f0f<br \/>\nR       # \u6301\u7eed\u66ff\u6362\u6a21\u5f0f&#xff0c;\u4e00\u76f4\u8986\u76d6\u5b57\u7b26&#xff0c;\u6309ESC\u9000\u51fa\u56de\u5230\u666e\u901a\u6a21\u5f0f<\/p>\n<h3>\u666e\u901a\u6a21\u5f0f \u2014 \u590d\u5236(yank)<\/h3>\n<p>yy      # \u590d\u5236\u5f53\u524d\u4e00\u884c&#xff0c;\u7b49\u4ef7 y1y<br \/>\ny3y     # \u590d\u5236\u8fde\u7eed3\u884c<\/p>\n<p># \u8bed\u6cd5\u62c6\u89e3&#xff1a;y(\u52a8\u4f5c\u590d\u5236) &#043; \u6570\u91cf &#043; \u5bf9\u8c61(y\u4ee3\u8868\u884c\/w\u5355\u8bcd)<\/p>\n<h2>\u4e8c\u3001Shell\u91cd\u5b9a\u5411<\/h2>\n<p>\u91cd\u5b9a\u5411&#xff1a;\u6539\u53d8\u6570\u636e\u6d41\u8f93\u51fa\u65b9\u5411&#xff0c;\u4e0d\u518d\u8f93\u51fa\u5230\u5c4f\u5e55&#xff0c;\u6d41\u5411\u6587\u4ef6\/\u8bbe\u5907<\/p>\n<p>\u6587\u4ef6\u63cf\u8ff0\u7b26&#xff1a;<\/p>\n<table>\n<tr>\u63cf\u8ff0\u7b26\u540d\u79f0\u542b\u4e49<\/tr>\n<tbody>\n<tr>\n<td>0<\/td>\n<td>stdin<\/td>\n<td>\u6807\u51c6\u8f93\u5165&#xff0c;\u8f93\u5165\u6570\u636e<\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>stdout<\/td>\n<td>\u6807\u51c6\u8f93\u51fa&#xff0c;\u547d\u4ee4\u6b63\u5e38\u6b63\u786e\u8f93\u51fa\u4fe1\u606f<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>stderr<\/td>\n<td>\u6807\u51c6\u9519\u8bef&#xff0c;\u62a5\u9519\u3001\u5f02\u5e38\u4fe1\u606f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>1&gt; \u7b49\u4ef7\u4e8e &gt;&#xff1b;0&lt; \u7b49\u4ef7\u4e8e &lt;<\/p>\n<h3>\u8f93\u51fa\u91cd\u5b9a\u5411<\/h3>\n<h4>1. 1&gt; \/ &gt; \u8986\u76d6\u91cd\u5b9a\u5411\u6807\u51c6\u8f93\u51fa<\/h4>\n<p>\u53ea\u4fdd\u5b58\u6b63\u786e\u8f93\u51fa&#xff0c;\u8986\u76d6\u539f\u6709\u6587\u4ef6&#xff1b;\u62a5\u9519\u4f9d\u65e7\u6253\u5370\u5c4f\u5e55<\/p>\n<p># \u5c06find\u6b63\u5e38\u7ed3\u679c\u8986\u76d6\u5199\u5165passwd.list&#xff0c;\u6743\u9650\u62a5\u9519\u6253\u5370\u5c4f\u5e55<br \/>\nfind \/etc -name &#039;passwd&#039; 1&gt;passwd.list<\/p>\n<h4>2. 2&gt; \u8986\u76d6\u91cd\u5b9a\u5411\u6807\u51c6\u9519\u8bef<\/h4>\n<p>\u53ea\u4fdd\u5b58\u62a5\u9519\u4fe1\u606f&#xff0c;\u8986\u76d6\u539f\u6709\u6587\u4ef6&#xff1b;\u6b63\u786e\u8f93\u51fa\u6253\u5370\u5c4f\u5e55<\/p>\n<p># \u62a5\u9519\u5199\u5165passwd.err&#xff0c;\u5339\u914d\u5230\u7684\u6587\u4ef6\u6253\u5370\u5230\u5c4f\u5e55<br \/>\nfind \/etc -name &#039;passwd&#039; 2&gt;passwd.err<\/p>\n<h4>3. 1&gt;&gt; \/ &gt;&gt; \u8ffd\u52a0\u6807\u51c6\u8f93\u51fa<\/h4>\n<p>\u6b63\u786e\u8f93\u51fa\u8ffd\u52a0\u5199\u5165\u6587\u4ef6&#xff0c;\u4e0d\u4f1a\u8986\u76d6\u65e7\u5185\u5bb9&#xff1b;\u62a5\u9519\u6253\u5370\u5c4f\u5e55<\/p>\n<p>find \/etc -name &#039;passwd&#039; &gt;&gt; passwd.list<\/p>\n<h4>4. 2&gt;&gt; \u8ffd\u52a0\u6807\u51c6\u9519\u8bef<\/h4>\n<p>\u62a5\u9519\u4fe1\u606f\u8ffd\u52a0\u5199\u5165\u6587\u4ef6&#xff0c;\u6b63\u786e\u8f93\u51fa\u6253\u5370\u5c4f\u5e55<\/p>\n<p>find \/etc -name &#039;passwd&#039; 2&gt;&gt; passwd.err<\/p>\n<h3>\u9ed1\u6d1e\u8bbe\u5907 \/dev\/null<\/h3>\n<p>\u5199\u5165\u8be5\u8bbe\u5907\u7684\u6570\u636e\u76f4\u63a5\u4e22\u5f03\u6d88\u5931&#xff0c;\u5e38\u7528\u4e8e\u5c4f\u853d\u62a5\u9519\u4fe1\u606f<\/p>\n<p># \u53ea\u770b\u6b63\u5e38\u8f93\u51fa&#xff0c;\u628a\u62a5\u9519\u4e22\u5f03<br \/>\nls \/etc \/abc 2&gt;\/dev\/null<\/p>\n<p># \u6807\u51c6\u8f93\u51fa&#043;\u9519\u8bef\u5168\u90e8\u4e22\u5f03&#xff0c;\u5c4f\u5e55\u65e0\u4efb\u4f55\u8f93\u51fa<br \/>\nls \/etc \/abc &amp;&gt; \/dev\/null<\/p>\n<h4>\u5feb\u901f\u6e05\u7a7a\u6587\u4ef6&#xff08;\u8986\u76d6\u7a7a\u5185\u5bb9&#xff09;<\/h4>\n<p>\u6587\u4ef6\u4e0d\u5b58\u5728\u4f1a\u81ea\u52a8\u521b\u5efa<\/p>\n<p>&gt; passwd.list<br \/>\ncat passwd.list<\/p>\n<h4>\u6b63\u786e\u8f93\u51fa&#043;\u9519\u8bef\u8f93\u51fa\u540c\u65f6\u5199\u5165\u540c\u4e00\u4e2a\u6587\u4ef6<\/h4>\n<p># \u901a\u7528\u5199\u6cd5&#xff0c;\u517c\u5bb9\u7edd\u5927\u591a\u6570shell&#xff1a; &gt;\u6587\u4ef6 2&gt;&amp;1<br \/>\nfind \/etc -name &#039;passwd&#039; &gt; passwd.log 2&gt;&amp;1<\/p>\n<p># bash\u4e13\u5c5e\u7b80\u5199 &amp;&gt;<br \/>\nfind \/etc -name &#039;passwd&#039; &amp;&gt; passwd.all<\/p>\n<p>\u2705\u9762\u8bd5\u8003\u70b9&#xff1a;2&gt;&amp;1 \u4e0d\u80fd\u5199\u6210 2&gt;1&#xff1b;\u540e\u8005\u662f\u628a\u9519\u8bef\u8f93\u51fa\u5199\u5165\u540d\u5b57\u53eb1\u7684\u666e\u901a\u6587\u4ef6\u3002<\/p>\n<h3>\u8f93\u5165\u91cd\u5b9a\u5411 &lt;<\/h3>\n<p># \u4e24\u6761\u547d\u4ee4\u6548\u679c\u7b49\u4ef7<br \/>\ncat passwd.list<br \/>\ncat &lt; passwd.list<\/p>\n<h3>\u591a\u884c\u8f93\u5165\u91cd\u5b9a\u5411 &lt;&lt;&#xff08;Here\u2011Doc&#xff09;<\/h3>\n<p>&lt;&lt;\u505c\u6b62\u7b26&#xff0c;\u9047\u5230\u5339\u914d\u505c\u6b62\u7b26\u7ed3\u675f\u8f93\u5165&#xff0c;\u5e38\u7528\u4e8e\u5feb\u901f\u751f\u6210\u914d\u7f6e\u6587\u4ef6<\/p>\n<p>cat &lt;&lt;EOF &gt; nginx.conf<br \/>\n&gt; server {<br \/>\n&gt;     listen 80;<br \/>\n&gt; }<br \/>\nEOF<\/p>\n<p># \u67e5\u770b\u751f\u6210\u7684\u914d\u7f6e<br \/>\ncat nginx.conf<\/p>\n<h3>tee\u547d\u4ee4<\/h3>\n<p>tee&#xff1a;\u63a5\u6536\u7ba1\u9053\u8f93\u5165&#xff0c;\u4e00\u4efd\u8f93\u51fa\u5c4f\u5e55&#xff0c;\u4e00\u4efd\u5199\u5165\u6587\u4ef6&#xff1b;\u672c\u8eab\u4e0d\u4ea7\u751f\u6570\u636e&#xff0c;\u4f9d\u8d56\u7ba1\u9053|<\/p>\n<p># tee \u9ed8\u8ba4\u8986\u76d6\u5199\u5165\u6587\u4ef6<br \/>\n# -a \u53c2\u6570&#xff1a;\u8ffd\u52a0\u5199\u5165&#xff0c;\u4e0d\u8986\u76d6\u539f\u6709\u5185\u5bb9<br \/>\ncat nginx.conf | tee -a passwd.log<\/p>\n<h2>\u907f\u5751\u603b\u7ed3<\/h2>\n<li>vim\u4e2d\u4e0d\u8981\u6df7\u6dc6i\/I\u3001a\/A\u3001o\/O&#xff1b;\u7f16\u8f91\u5b8c\u4e00\u5b9a\u8981\u6309ESC\u5207\u56de\u666e\u901a\u6a21\u5f0f\u3002<\/li>\n<li>&gt;\u662f\u8986\u76d6&#xff0c;&gt;&gt;\u662f\u8ffd\u52a0&#xff0c;\u5199\u65e5\u5fd7\u4f18\u5148\u7528\u8ffd\u52a0\u9632\u6b62\u5386\u53f2\u6570\u636e\u4e22\u5931\u3002<\/li>\n<li>2&gt;&amp;1\u987a\u5e8f\u4e0d\u80fd\u4e71&#xff0c;\u5fc5\u987b\u653e\u5728\u76ee\u6807\u6587\u4ef6\u540d\u540e\u9762\u3002<\/li>\n<li>\/dev\/null\u53ea\u662f\u4e22\u5f03\u8f93\u51fa&#xff0c;\u4e0d\u4f1a\u6740\u6b7b\u8fdb\u7a0b\u3002<\/li>\n<li>tee\u5fc5\u987b\u914d\u5408\u7ba1\u9053&#xff0c;\u5355\u72ec\u6267\u884ctee\u4f1a\u7b49\u5f85\u952e\u76d8\u8f93\u5165\u3002<\/li>\n<h2>\u5b66\u4e60\u7b14\u8bb0\u5c0f\u7ed3\u3010\u9762\u8bd5\u901f\u8bb0\u3011<\/h2>\n<li>vim dd\u5220\u9664\u884c&#xff0c;yy\u590d\u5236\u884c&#xff1b;u\u64a4\u9500&#xff0c;U\u64a4\u9500\u6574\u884c\u4fee\u6539\u3002<\/li>\n<li>\u6587\u4ef6\u63cf\u8ff0\u7b26&#xff1a;0\u8f93\u5165&#xff0c;1\u6807\u51c6\u8f93\u51fa&#xff0c;2\u9519\u8bef\u8f93\u51fa\u3002<\/li>\n<li>&gt; file 2&gt;&amp;1\u4e0e&amp;&gt; file\u6548\u679c\u76f8\u540c&#xff0c;\u540e\u8005\u4ec5bash\u652f\u6301\u3002<\/li>\n<li>&lt;&lt;EOF \u4e3ahere\u2011doc&#xff0c;\u811a\u672c\u4e2d\u6279\u91cf\u5199\u914d\u7f6e\u9ad8\u9891\u7528\u6cd5\u3002<\/li>\n<li>tee\u4f5c\u7528&#xff1a;\u5c4f\u5e55&#043;\u6587\u4ef6\u53cc\u4efd\u8f93\u51fa&#xff0c;-a\u5f00\u542f\u8ffd\u52a0\u6a21\u5f0f\u3002<\/li>\n","protected":false},"excerpt":{"rendered":"<p>Linux Vim\u6587\u672c\u7f16\u8f91  \u91cd\u5b9a\u5411\u5b9e\u6218\u7b14\u8bb0&#xff08;CentOS7&#xff09;<br \/>\n\u6458\u8981&#xff1a;\u672c\u6587\u6574\u7406CentOS7\u4e0bvim\u7f16\u8f91\u5668\u5e38\u7528\u5feb\u6377\u952e\u3001\u6587\u672c\u7f16\u8f91\u64cd\u4f5c\u4ee5\u53cashell\u8f93\u5165\u8f93\u51fa\u91cd\u5b9a\u5411\u5168\u5957\u5b9e\u6218\u3002\u5168\u90e8\u793a\u4f8b\u547d\u4ee4\u53ef\u76f4\u63a5\u590d\u5236\u8fd0\u884c&#xff0c;\u533a\u5206\u8986\u76d6\/\u8ffd\u52a0\u3001\u6807\u51c6\u8f93\u51fa\/\u9519\u8bef\u8f93\u51fa&#xff0c;\u8bb2\u89e3\/dev\/null\u9ed1\u6d1e\u8bbe\u5907\u3001here\u2011doc\u3001tee\u5de5\u5177&#xff0c;\u6807\u6ce8\u65b0\u624b\u9ad8\u9891\u8e29\u5751\u70b9&#xff0c;\u9002\u5408CSDN\u3001\u8bed\u96c0\u5b9e\u9a8c\u7b14\u8bb0\u4e0e\u9762\u8bd5\u590d\u4e60\u3002<br \/>\n\u4e00\u3001Vim\u7f16\u8f91\u5668<br \/>\n\u5b89\u88c5vim<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[58,1802,487],"topic":[],"class_list":["post-101962","post","type-post","status-publish","format-standard","hentry","category-server","tag-linux","tag-vim","tag-487"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Linux\u5b9e\u6218\uff5cVim\u7f16\u8f91\u5668\u5168\u5957\u5feb\u6377\u952e + Shell\u91cd\u5b9a\u5411\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/101962.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux\u5b9e\u6218\uff5cVim\u7f16\u8f91\u5668\u5168\u5957\u5feb\u6377\u952e + Shell\u91cd\u5b9a\u5411\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"Linux Vim\u6587\u672c\u7f16\u8f91 \u91cd\u5b9a\u5411\u5b9e\u6218\u7b14\u8bb0&#xff08;CentOS7&#xff09; \u6458\u8981&#xff1a;\u672c\u6587\u6574\u7406CentOS7\u4e0bvim\u7f16\u8f91\u5668\u5e38\u7528\u5feb\u6377\u952e\u3001\u6587\u672c\u7f16\u8f91\u64cd\u4f5c\u4ee5\u53cashell\u8f93\u5165\u8f93\u51fa\u91cd\u5b9a\u5411\u5168\u5957\u5b9e\u6218\u3002\u5168\u90e8\u793a\u4f8b\u547d\u4ee4\u53ef\u76f4\u63a5\u590d\u5236\u8fd0\u884c&#xff0c;\u533a\u5206\u8986\u76d6\/\u8ffd\u52a0\u3001\u6807\u51c6\u8f93\u51fa\/\u9519\u8bef\u8f93\u51fa&#xff0c;\u8bb2\u89e3\/dev\/null\u9ed1\u6d1e\u8bbe\u5907\u3001here\u2011doc\u3001tee\u5de5\u5177&#xff0c;\u6807\u6ce8\u65b0\u624b\u9ad8\u9891\u8e29\u5751\u70b9&#xff0c;\u9002\u5408CSDN\u3001\u8bed\u96c0\u5b9e\u9a8c\u7b14\u8bb0\u4e0e\u9762\u8bd5\u590d\u4e60\u3002 \u4e00\u3001Vim\u7f16\u8f91\u5668 \u5b89\u88c5vim\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/101962.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-07T15:08:56+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/101962.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/101962.html\",\"name\":\"Linux\u5b9e\u6218\uff5cVim\u7f16\u8f91\u5668\u5168\u5957\u5feb\u6377\u952e + Shell\u91cd\u5b9a\u5411\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-09-07T15:08:56+00:00\",\"dateModified\":\"2026-09-07T15:08:56+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/101962.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/101962.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/101962.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux\u5b9e\u6218\uff5cVim\u7f16\u8f91\u5668\u5168\u5957\u5feb\u6377\u952e + Shell\u91cd\u5b9a\u5411\u8be6\u89e3\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Linux\u5b9e\u6218\uff5cVim\u7f16\u8f91\u5668\u5168\u5957\u5feb\u6377\u952e + Shell\u91cd\u5b9a\u5411\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/101962.html","og_locale":"zh_CN","og_type":"article","og_title":"Linux\u5b9e\u6218\uff5cVim\u7f16\u8f91\u5668\u5168\u5957\u5feb\u6377\u952e + Shell\u91cd\u5b9a\u5411\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"Linux Vim\u6587\u672c\u7f16\u8f91 \u91cd\u5b9a\u5411\u5b9e\u6218\u7b14\u8bb0&#xff08;CentOS7&#xff09; \u6458\u8981&#xff1a;\u672c\u6587\u6574\u7406CentOS7\u4e0bvim\u7f16\u8f91\u5668\u5e38\u7528\u5feb\u6377\u952e\u3001\u6587\u672c\u7f16\u8f91\u64cd\u4f5c\u4ee5\u53cashell\u8f93\u5165\u8f93\u51fa\u91cd\u5b9a\u5411\u5168\u5957\u5b9e\u6218\u3002\u5168\u90e8\u793a\u4f8b\u547d\u4ee4\u53ef\u76f4\u63a5\u590d\u5236\u8fd0\u884c&#xff0c;\u533a\u5206\u8986\u76d6\/\u8ffd\u52a0\u3001\u6807\u51c6\u8f93\u51fa\/\u9519\u8bef\u8f93\u51fa&#xff0c;\u8bb2\u89e3\/dev\/null\u9ed1\u6d1e\u8bbe\u5907\u3001here\u2011doc\u3001tee\u5de5\u5177&#xff0c;\u6807\u6ce8\u65b0\u624b\u9ad8\u9891\u8e29\u5751\u70b9&#xff0c;\u9002\u5408CSDN\u3001\u8bed\u96c0\u5b9e\u9a8c\u7b14\u8bb0\u4e0e\u9762\u8bd5\u590d\u4e60\u3002 \u4e00\u3001Vim\u7f16\u8f91\u5668 \u5b89\u88c5vim","og_url":"https:\/\/www.wsisp.com\/helps\/101962.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-09-07T15:08:56+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/101962.html","url":"https:\/\/www.wsisp.com\/helps\/101962.html","name":"Linux\u5b9e\u6218\uff5cVim\u7f16\u8f91\u5668\u5168\u5957\u5feb\u6377\u952e + Shell\u91cd\u5b9a\u5411\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-09-07T15:08:56+00:00","dateModified":"2026-09-07T15:08:56+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/101962.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/101962.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/101962.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Linux\u5b9e\u6218\uff5cVim\u7f16\u8f91\u5668\u5168\u5957\u5feb\u6377\u952e + Shell\u91cd\u5b9a\u5411\u8be6\u89e3"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/101962","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=101962"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/101962\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=101962"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=101962"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=101962"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=101962"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}