{"id":295333,"date":"2025-01-01T20:07:09","date_gmt":"2025-01-01T12:07:09","guid":{"rendered":"https:\/\/gulass.cn\/zwvhvlxtzgxw.html"},"modified":"2025-01-01T20:07:09","modified_gmt":"2025-01-01T12:07:09","slug":"zwvhvlxtzgxw","status":"publish","type":"post","link":"https:\/\/gulass.cn\/zwvhvlxtzgxw.html","title":{"rendered":"\u638c\u63e1Vi\u548cVim\uff1aLinux\u7cfb\u7edf\u4e2d\u9ad8\u6548\u6587\u672c\u7f16\u8f91\u7684\u5173\u952e\u6280\u5de7\u4e0e\u533a\u522b"},"content":{"rendered":"

vi\u5728Linux<\/a>\u7cfb\u7edf\u4e2d\u626e\u6f14\u7740\u5173\u952e\u89d2\u8272\uff0c\u662f\u9891\u7e41\u4f7f\u7528\u7684\u6587\u672c\u7f16\u8f91\u6307\u4ee4\u4e4b\u4e00\u3002\u5176\u529f\u80fd\u76f8\u5f53\u5168\u9762\uff0c\u4e0d\u8fc7\u5bf9\u4e8e\u65b0\u624b\u800c\u8a00\uff0c\u64cd\u4f5c\u4e0a\u53ef\u80fd\u663e\u5f97\u6709\u4e9b\u7e41\u7410\u3002\u719f\u7ec3\u8fd0\u7528vi\u5bf9\u4e8e\u5728Linux\u7cfb\u7edf\u4e2d\u7f16\u8f91\u6587\u4ef6\u548c\u914d\u7f6e\u7cfb\u7edf\u7b49\u4efb\u52a1\u6781\u4e3a\u6709\u76ca\u3002<\/p>\n

Vim<\/a>\u4e0eVi\u7684\u5173\u7cfb<\/b><\/p>\n

Vim\u662fVi\u7684\u5347\u7ea7\u7248\u3002Vi\u867d\u7136\u5df2\u6709\u57fa\u672c\u7684\u6587\u672c\u7f16\u8f91\u80fd\u529b\uff0c\u4f46Vim\u7684\u529f\u80fd\u66f4\u4e3a\u4e30\u5bcc\u3002\u6bd4\u5982\uff0c\u5728\u591a\u6570Linux\u7cfb\u7edf\u91cc\uff0c\u8f93\u5165vi\u547d\u4ee4<\/a>\uff0c\u5b9e\u9645\u4e0a\u6267\u884c\u7684\u662fVim\u3002\u4ee5\u4fee\u6539\u7cfb\u7edf\u914d\u7f6e\u6587\u4ef6\u4e3a\u4f8b\uff0cVim\u4e2d\u7684\u8bed\u6cd5\u9ad8\u4eae\u7b49\u7279\u6b8a\u529f\u80fd\u4f7f\u7528\u8d77\u6765\u66f4\u4e3a\u4fbf\u6377\u3002\u8fd9\u79cd\u8054\u7cfb\u4f7f\u5f97\u7528\u6237\u53ef\u6839\u636e\u4e0d\u540c\u9700\u6c42\uff0c\u7075\u6d3b\u5730\u5728Vi\u548cVim\u4e4b\u95f4\u5207\u6362\u3002Vi\u76f8\u5bf9\u7b80\u5355\u76f4\u63a5linux\u7f16\u8f91\u6587\u4ef6\u547d\u4ee4 vi<\/strong>\uff0c\u66f4\u9002\u5408\u5feb\u901f\u7b80\u5355\u7684\u7f16\u8f91\u5de5\u4f5c\u3002<\/p>\n

linux\u547d\u4ee4\u884c\u7f16\u8f91\u6587\u4ef6_linux\u7f16\u8f91\u6587\u4ef6\u547d\u4ee4vim_linux\u7f16\u8f91\u6587\u4ef6\u547d\u4ee4 vi<\/p>\n

\u82e5\u8981\u5728\u8001\u65e7\u7cfb\u7edf\u6216\u8d44\u6e90\u4e0d\u8db3\u7684\u73af\u5883\u4e2d\u8f7b\u677e\u8fdb\u884c\u7f16\u8f91\uff0cVi\u4f1a\u662f\u66f4\u4f73\u4e4b\u9009\uff0c\u5b83\u5bf9\u7cfb\u7edf\u8d44\u6e90\u7684\u6d88\u8017\u76f8\u5bf9\u8f83\u5c0f\u3002<\/p>\n

\u57fa\u672c\u64cd\u4f5c\u6a21\u5f0f<\/b><\/p>\n

vi\u7684\u8fdb\u5165\u65b9\u5f0f\u5206\u4e3a\u4e24\u79cd\uff1a\u547d\u4ee4\u548c\u63d2\u5165\u3002\u4e00\u5f00\u59cb\u6253\u5f00\u6587\u4ef6\u65f6\uff0c\u9ed8\u8ba4\u662f\u547d\u4ee4\u6a21\u5f0f\u3002\u5728\u8fd9\u79cd\u6a21\u5f0f\u4e0b\uff0c\u6587\u5b57\u8f93\u5165\u662f\u88ab\u7981\u6b62\u7684\u3002\u6bd4\u5982\uff0c\u82e5\u8981\u5411\u4e0b\u79fb\u52a8\u4e00\u884c\uff0c\u53ea\u9700\u6309j\u952e\uff1b\u82e5\u8981\u590d\u5236\u4e00\u884c\uff0c\u5148\u5728\u76ee\u6807\u884c\u6309yy\uff0c\u518d\u5728\u590d\u5236\u884c\u6309p\u3002\u81f3\u4e8e\u63d2\u5165\u6a21\u5f0f\uff0c\u5219\u662f\u7528\u4e8e\u8f93\u5165\u6587\u5b57\u7684\u3002\u4ece\u547d\u4ee4\u6a21\u5f0f\u5207\u6362\u5230\u63d2\u5165\u6a21\u5f0f\u6709\u591a\u79cd\u9014\u5f84\uff0c\u6bd4\u5982\u6309i\u952e\u5c31\u80fd\u5728\u5149\u6807\u6240\u5728\u4f4d\u7f6e\u5f00\u59cb\u8f93\u5165\u3002<\/p>\n

linux\u7f16\u8f91\u6587\u4ef6\u547d\u4ee4vim_linux\u7f16\u8f91\u6587\u4ef6\u547d\u4ee4 vi_linux\u547d\u4ee4\u884c\u7f16\u8f91\u6587\u4ef6<\/p>\n

\u8fd8\u6709\u4e00\u62db\u8fdb\u5165\u63d2\u5165\u6a21\u5f0f\u633a\u5e38\u89c1\uff0c\u5c31\u662f\u6309a\u952e\uff0c\u8fd9\u6837\u5c31\u80fd\u5728\u5149\u6807\u6240\u5728\u4f4d\u7f6e\u540e\u4e00\u4e2a\u5b57\u7b26\u7684\u4f4d\u7f6e\u5f00\u59cb\u7f16\u8f91\u3002\u8981\u60f3\u73a9\u8f6cvi\uff0c\u5148\u5f97\u5f04\u61c2\u8fd9\u4e24\u79cd\u57fa\u7840\u64cd\u4f5c\u6a21\u5f0f\u3002\u6839\u636e\u4e0d\u540c\u7684\u9700\u6c42\uff0c\u6211\u4eec\u5f97\u77e5\u9053\u4ec0\u4e48\u65f6\u5019\u5728\u8fd9\u4e24\u79cd\u6a21\u5f0f\u95f4\u5207\u6362\u3002<\/p>\n

\u4fdd\u5b58\u4e0e\u9000\u51fa<\/b><\/p>\n

\u9000\u51favi\u7f16\u8f91\u5668\u65f6\uff0c\u6709\u51e0\u79cd\u64cd\u4f5c\u65b9\u5f0f\u3002\u82e5\u8981\u4fdd\u5b58\u6587\u4ef6\uff0c\u53ea\u9700\u8f93\u5165\u547d\u4ee4:w<\/code>\u3002\u82e5\u9700\u5c06\u6587\u4ef6\u53e6\u5b58\u4e3a\u7279\u5b9a\u540d\u79f0\uff0c\u5219\u8f93\u5165:w newfilename<\/code>\u3002\u82e5\u60f3\u4fdd\u5b58\u6587\u4ef6\u5e76\u9000\u51fa\uff0c\u53ef\u4ee5\u8f93\u5165:wq<\/code>\u6216\u76f4\u63a5\u6309ZZ<\/code>\u952e\u3002\u82e5\u4e0d\u60f3\u4fdd\u5b58\u4fee\u6539\u76f4\u63a5\u9000\u51fa\uff0c\u5219\u8f93\u5165:q!<\/code>\u3002\u8fd9\u4e9b\u547d\u4ee4\u5728\u7f16\u8f91\u8fc7\u7a0b\u4e2d\u7ecf\u5e38\u4f7f\u7528\u3002\u6bd4\u5982\uff0c\u5728\u4fee\u6539\u7cfb\u7edf\u914d\u7f6e\u6587\u4ef6\u65f6\uff0c\u4fee\u6539\u6210\u529f\u540e\u9700\u8981\u4fdd\u5b58\u5e76\u5e94\u7528\u65b0\u914d\u7f6e\uff0c\u8fd9\u65f6\u5019\u5c31\u4f1a\u7528\u5230:wq<\/code>\u547d\u4ee4\u3002<\/p>\n

linux\u7f16\u8f91\u6587\u4ef6\u547d\u4ee4vim_linux\u547d\u4ee4\u884c\u7f16\u8f91\u6587\u4ef6_linux\u7f16\u8f91\u6587\u4ef6\u547d\u4ee4 vi<\/p>\n

\u82e5\u4e0d\u5c0f\u5fc3\u8fdb\u884c\u4e86\u9519\u8bef\u7684\u7f16\u8f91\uff0c\u53c8\u4e0d\u60f3\u4fdd\u5b58\u4fee\u6539\uff0c\u62c5\u5fc3\u8bef\u64cd\u4f5c\u4f1a\u8986\u76d6\u539f\u6709\u6587\u4ef6arm linux\uff0c\u90a3\u4e48\u8fd9\u4e2a\u529f\u80fd\u5c31\u975e\u5e38\u5b9e\u7528\u4e86\u3002\u719f\u7ec3\u638c\u63e1\u4e0e\u4fdd\u5b58\u548c\u9000\u51fa\u76f8\u5173\u7684\u64cd\u4f5c\u6307\u4ee4\uff0c\u53ef\u4ee5\u51cf\u5c11\u8bb8\u591a\u4e0d\u5fc5\u8981\u7684\u9ebb\u70e6\u3002<\/p>\n

\u67e5\u627e\u4e0e\u66ff\u6362<\/b><\/p>\n

\u5728vi\u7f16\u8f91\u5668\u4e2d\u641c\u7d22\u4fe1\u606f\uff0c\u53ef\u5728\u547d\u4ee4\u72b6\u6001\u8f93\u5165\u201c\/\u5173\u952e\u8bcd\u201d\u6765\u5b9a\u4f4d\u7279\u5b9a\u5173\u952e\u8bcd\u3002\u6309\u4e0b\u201cn\u201d\u952e\u53ef\u7ee7\u7eed\u67e5\u627e\u540e\u7eed\u5339\u914d\u9879\u3002\u8fdb\u884c\u66ff\u6362\u65f6\uff0c\u82e5\u53ea\u60f3\u66ff\u6362\u5f53\u524d\u884c\u7684\u9996\u4e2a\u5339\u914d\uff0c\u53ef\u8f93\u5165\u201c:s\/\u65e7\u5185\u5bb9\/\u65b0\u5185\u5bb9\u201d\u3002\u82e5\u9700\u66ff\u6362\u6574\u884c\u4e2d\u7684\u6240\u6709\u5339\u914d\u9879\uff0c\u5219\u9700\u5728\u547d\u4ee4\u672b\u5c3e\u6dfb\u52a0\u201c\/g\u201d\u3002\u4ee5\u7f16\u8f91\u811a\u672c\u6587\u4ef6\u4e3a\u4f8b\uff0c\u67e5\u627e\u7279\u5b9a\u6307\u4ee4\u662f\u5173\u952e\uff0c\u82e5\u53d1\u73b0\u65e7\u6307\u4ee4\u9700\u66f4\u65b0\u4e3a\u65b0\u7684\uff0c\u66ff\u6362\u529f\u80fd\u4fbf\u80fd\u6d3e\u4e0a\u7528\u573a\u3002<\/p>\n

\u5728\u6587\u4ef6\u4e2d\u5168\u9762\u641c\u5bfb\u5e76\u66f4\u6362\u7279\u5b9a\u8bcd\u65f6\uff0c\u53ef\u4ee5\u8f93\u5165\u547d\u4ee4\uff1a\u7528\u201cold\u201d\u66ff\u6362\u201cnew\u201d\uff0c\u683c\u5f0f\u4e3a:%s\/old\/new\/g\u3002\u6b64\u64cd\u4f5c\u80fd\u904d\u5386\u6574\u4e2a\u6587\u6863\uff0c\u5c06\u6240\u6709\u5339\u914d\u9879\u66f4\u65b0\uff0c\u5bf9\u4e8e\u4fee\u6539\u811a\u672c\u6216\u8c03\u6574\u914d\u7f6e\u6587\u4ef6\uff0c\u80fd\u663e\u8457\u63d0\u5347\u5de5\u4f5c\u6548\u7387\u3002<\/p>\n

\u6587\u672c\u5757\u64cd\u4f5c<\/b><\/p>\n

linux\u7f16\u8f91\u6587\u4ef6\u547d\u4ee4 vi_linux\u547d\u4ee4\u884c\u7f16\u8f91\u6587\u4ef6_linux\u7f16\u8f91\u6587\u4ef6\u547d\u4ee4vim<\/p>\n

Vi\u8f6f\u4ef6\u5141\u8bb8\u7528\u6237\u5bf9\u6587\u672c\u533a\u57df\u8fdb\u884c\u4e00\u7cfb\u5217\u64cd\u4f5c\u3002\u82e5\u9700\u9009\u62e9\u591a\u884c\u6587\u672c\uff0c\u9996\u5148\u5c06\u5149\u6807\u7f6e\u4e8e\u6587\u672c\u5757\u7684\u8d77\u59cb\u884c\uff0c\u63a5\u7740\u6309\u4e0bv\u952e\u5207\u6362\u81f3\u53ef\u89c6\u6a21\u5f0f\uff0c\u968f\u540e\u79fb\u52a8\u5149\u6807\u4ee5\u9009\u62e9\u6240\u9700\u7684\u591a\u884c\u3002\u9009\u5b9a\u6587\u672c\u5757\u540e\uff0c\u7528\u6237\u53ef\u6267\u884c\u590d\u5236\u3001\u7c98\u8d34\u6216\u5220\u9664\u7b49\u64cd\u4f5c\u3002\u4f8b\u5982\uff0c\u590d\u5236\u64cd\u4f5c\u901a\u8fc7\u6309\u4e0by\u952e\u5b8c\u6210\uff0c\u7c98\u8d34\u5219\u6309p\u952e\u3002\u6b64\u5916linux windows\uff0c\u8fd8\u53ef\u6267\u884c\u66f4\u590d\u6742\u7684\u64cd\u4f5c\uff0c\u6bd4\u5982\u5c06\u9009\u4e2d\u7684\u6587\u672c\u5757\u79fb\u52a8\u81f3\u5176\u4ed6\u4f4d\u7f6e\uff0c\u8fd9\u9700\u8981\u5148\u6309d\u952e\uff0c\u518d\u5c06\u5149\u6807\u79fb\u81f3\u76ee\u6807\u4f4d\u7f6e\u5e76\u6309p\u952e\u3002<\/p>\n

\u5904\u7406\u5927\u6587\u672c\u6587\u4ef6\uff0c\u6bd4\u5982\u64b0\u5199\u957f\u7bc7\u6587\u6863\u6216\u914d\u7f6e\u591a\u4e2a\u7c7b\u4f3c\u9879\u76ee\u65f6\uff0c\u8fd9\u79cd\u6587\u672c\u5757\u64cd\u4f5c\u7684\u4fbf\u6377\u6027\u5c24\u4e3a\u660e\u663e\u3002\u5feb\u901f\u9009\u53d6\u5185\u5bb9\u8fdb\u884c\u7f16\u8f91\uff0c\u6bd4\u9010\u884c\u64cd\u4f5c\u8981\u9ad8\u6548\u5f97\u591a\u3002<\/p>\n

\u81ea\u5b9a\u4e49\u914d\u7f6e<\/b><\/p>\n

linux\u7f16\u8f91\u6587\u4ef6\u547d\u4ee4 vi_linux\u547d\u4ee4\u884c\u7f16\u8f91\u6587\u4ef6_linux\u7f16\u8f91\u6587\u4ef6\u547d\u4ee4vim<\/p>\n

Vi\u540c\u6837\u652f\u6301\u7528\u6237\u81ea\u5b9a\u4e49\u8bbe\u7f6e\u3002\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u4fee\u6539\u5bb6\u76ee\u5f55\u4e2d\u7684.vimrc\u6587\u4ef6\uff08\u5728Vim\u7f16\u8f91\u5668\u4e2d\u4f7f\u7528\uff0cVi\u7684\u914d\u7f6e\u6587\u4ef6\u4e5f\u662f\u8fd9\u4e2a\u601d\u8def\uff09\u6765\u8c03\u6574\u4ee5\u6ee1\u8db3\u4e2a\u4eba\u504f\u597d\u3002\u6bd4\u5982\uff0c\u7528\u6237\u53ef\u4ee5\u5f00\u542f\u884c\u53f7\u663e\u793a\uff0c\u53ea\u9700\u5728.vimrc\u6587\u4ef6\u4e2d\u6dfb\u52a0\u201cset nu\u201d\u8fd9\u4e00\u6307\u4ee4\u3002\u6b64\u5916\uff0c\u7528\u6237\u8fd8\u53ef\u4ee5\u8c03\u6574Tab\u952e\u7684\u5bbd\u5ea6\u3002\u82e5\u7528\u6237\u5bf9\u7f16\u8f91\u5668\u7684\u64cd\u4f5c\u65b9\u5f0f\u6709\u7279\u5b9a\u504f\u597d\uff0c\u901a\u8fc7\u7f16\u8f91.vimrc\u6587\u4ef6\uff0c\u53ef\u4ee5\u4f7fvi\u7684\u64cd\u4f5c\u66f4\u52a0\u8d34\u5408\u4e2a\u4eba\u4e60\u60ef\u3002<\/p>\n

\u6b64\u5916\uff0c\u4f60\u8fd8\u53ef\u4ee5\u901a\u8fc7\u5b89\u88c5\u63d2\u4ef6\u6765\u589e\u5f3avi\u7684\u80fd\u529b\u3002\u5e02\u9762\u4e0a\u6709\u8bb8\u591a\u7b2c\u4e09\u65b9\u63d2\u4ef6\uff0c\u5b83\u4eec\u80fd\u63d0\u4f9b\u4ee3\u7801\u81ea\u52a8\u5b8c\u6210\u3001\u8bed\u6cd5\u6821\u9a8c\u7b49\u670d\u52a1\u3002\u8fd9\u6837\u4e00\u6765\uff0cvi\/Vim\u5728\u5404\u7c7b\u5f00\u53d1\u73af\u5883\u4e2d\u90fd\u80fd\u6d3e\u4e0a\u7528\u573a\u3002<\/p>\n

\u60f3\u8981\u6df1\u5165\u7814\u7a76Linux\u5e76\u9891\u7e41\u7f16\u8f91\u811a\u672c\u4e0e\u914d\u7f6e\u6587\u4ef6\u7684\u670b\u53cb\u4eeclinux\u7f16\u8f91\u6587\u4ef6\u547d\u4ee4 vi<\/strong>\uff0c\u4f60\u4eec\u662f\u5426\u638c\u63e1\u4e86\u4e00\u4e9b\u72ec\u5230\u7684vi\u64cd\u4f5c\u5c0f\u7a8d\u95e8\uff1f\u671f\u5f85\u5927\u5bb6\u80fd\u70b9\u8d5e\u5e76\u8f6c\u53d1\u8fd9\u7bc7\u5185\u5bb9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

vi\u5728Linux\u7cfb\u7edf\u4e2d\u626e\u6f14\u7740\u5173\u952e\u89d2\u8272\uff0c\u662f\u9891\u7e41\u4f7f\u7528\u7684\u6587\u672c\u7f16\u8f91\u6307\u4ee4\u4e4b\u4e00\u3002\u719f\u7ec3\u8fd0\u7528vi\u5bf9\u4e8e\u5728Linux\u7cfb\u7edf\u4e2d\u7f16\u8f91\u6587\u4ef6\u548c\u914d\u7f6e\u7cfb\u7edf\u7b49\u4efb\u52a1\u6781\u4e3a\u6709\u76ca\u3002\u5728vi\u7f16\u8f91\u5668\u4e2d\u641c\u7d22\u4fe1\u606f\uff0c\u53ef\u5728\u547d\u4ee4\u72b6\u6001\u8f93\u5165\u201c\/\u5173\u952e\u8bcd\u201d\u6765\u5b9a\u4f4d\u7279\u5b9a\u5173\u952e\u8bcd\u3002\u5feb\u901f\u9009\u53d6\u5185\u5bb9\u8fdb\u884c\u7f16\u8f91\uff0c\u6bd4\u9010\u884c\u64cd\u4f5c\u8981\u9ad8\u6548\u5f97\u591a\u3002<\/p>\n","protected":false},"author":1,"featured_media":295334,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[5353,132,5352,5350,5351],"class_list":["post-295333","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-vwj","tag-vim","tag-czth","tag-xtpzwj","tag-bjjb"],"acf":[],"_links":{"self":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/295333","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/comments?post=295333"}],"version-history":[{"count":0,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/295333\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media\/295334"}],"wp:attachment":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media?parent=295333"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/categories?post=295333"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/tags?post=295333"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}