{"id":1669,"date":"2014-12-06T14:58:50","date_gmt":"2014-12-06T06:58:50","guid":{"rendered":"http:\/\/ixyzero.com\/blog\/?p=1669"},"modified":"2014-12-06T14:58:50","modified_gmt":"2014-12-06T06:58:50","slug":"vim%e6%93%8d%e4%bd%9c%e7%bb%83%e4%b9%a0","status":"publish","type":"post","link":"https:\/\/ixyzero.com\/blog\/archives\/1669.html","title":{"rendered":"Vim\u64cd\u4f5c\u7ec3\u4e60"},"content":{"rendered":"<p>\u665a\u4e0a\u56de\u6765\u4e4b\u540e\u95f2\u6765\u65e0\u4e8b\uff0c\u4e1c\u7ffb\u7ffb\u897f\u7ffb\u7ffb\u7684\uff0c\u627e\u5230\u4e86\u4e4b\u524d\u4e0b\u8f7d\u7684\u4e00\u7bc7\u300aVim tutorial\u300b\uff0c\u53d1\u73b0\u4e86\u4e00\u4e9b\u81ea\u5df1\u4e4b\u524d\u6ca1\u600e\u4e48\u6ce8\u610f\u5230\u7684\u547d\u4ee4\uff0c\u503c\u5f97\u5b66\u4e60\uff0c\u5c31\u6b64\u8bb0\u5f55\u4e00\u4e0b\uff1a<\/p>\n<p>CTRL-F \u00a0#\u5411\u4e0b\u7ffb\u4e00\u9875<br \/>\nCTRL-B \u00a0#\u5411\u4e0a\u7ffb\u4e00\u9875<br \/>\nCTRL-D \u00a0#\u5411\u4e0b\u7ffb\u534a\u9875<br \/>\nCTRL-U \u00a0#\u5411\u4e0a\u7ffb\u534a\u9875<\/p>\n<p>{ \u00a0#Go to the beginning of current paragraph<br \/>\n} \u00a0#Go to the beginning of next paragraph<br \/>\n( \u00a0#Go to the beginning of previous sentence<br \/>\n) \u00a0#Go to the beginning of next sentence<br \/>\n% \u00a0#Jump to the matching {..} or (..)<\/p>\n<p>w \u00a0#Go to the beginning of next word<br \/>\nW \u00a0#Go to the beginning of next WORD<br \/>\ne \u00a0#Go to the end of current word<br \/>\nE \u00a0#Go to the end of current WORD<br \/>\nb \u00a0#Go to the beginning of previous word<br \/>\nB \u00a0#Go to the beginning of previous WORD<br \/>\n0 \u00a0#(zero) Go to the starting of current line<br \/>\n$ \u00a0#(dollar) Go to the end of current line<\/p>\n<p>H \u00a0#<span style=\"color: #000000;\"><strong>Go to <span style=\"color: #0000ff;\">the first line<\/span> of current screen<\/strong><\/span><br \/>\nM \u00a0#<strong>Go to <span style=\"color: #ff0000;\">the middle line<\/span> of current screen<\/strong><br \/>\nL \u00a0#<span style=\"color: #000000;\"><strong>Go to <span style=\"color: #0000ff;\">the last line<\/span> of current screen<\/strong><\/span><br \/>\nzz #Redraw the screen with the current line under the cursor at the middle of the screen<\/p>\n<p>:jumps \u00a0 \u00a0 #view the jump list<br \/>\nCTRL-O \u00a0 \u00a0 #Jump back to previous spot<br \/>\nCTRL-I \u00a0 \u00a0 #Jump forward to next spot<br \/>\ngf \u00a0 \u00a0 \u00a0 \u00a0 #Go to file\uff08\u8df3\u8f6c\u81f3\u5149\u6807\u6240\u5728\u5904\u6587\u4ef6\uff09<br \/>\nCTRL-W gf \u00a0#Go to file with open new tab<br \/>\ngg=G \u00a0#format the entire buffer\uff08\u683c\u5f0f\u5316\u5e38\u7528\uff09<\/p>\n<p>:g\/PATTERN\/d \u00a0#Delete the line which has a specific pattern<br \/>\n:v\/PATTERN\/d \u00a0#Delete the line which doesn\u2019t has a specific pattern{\u975e\u5e38\u6709\u7528}<br \/>\n:g\/^$\/,\/.\/-j \u00a0#Reduce multiple blank lines into a single blank line<br \/>\n:g\/^\/m0 \u00a0 \u00a0 \u00a0 #Reverse a file{\u5c06\u6587\u4ef6\u5185\u5bb9\u7684\u6240\u6709\u884c\u53cd\u8f6c\u4e86\uff0c\u7c7b\u4f3c\u4e8etac\u547d\u4ee4}<\/p>\n<h6>\u63d2\u5165\u64cd\u4f5c\uff1a<\/h6>\n<p><a href=\"http:\/\/ixyzero.com\/blog\/wp-content\/uploads\/2014\/12\/insert_in_vim.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1670\" src=\"http:\/\/ixyzero.com\/blog\/wp-content\/uploads\/2014\/12\/insert_in_vim.png\" alt=\"insert_in_vim\" width=\"658\" height=\"391\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u665a\u4e0a\u56de\u6765\u4e4b\u540e\u95f2\u6765\u65e0\u4e8b\uff0c\u4e1c\u7ffb\u7ffb\u897f\u7ffb\u7ffb\u7684\uff0c\u627e\u5230\u4e86\u4e4b\u524d\u4e0b\u8f7d\u7684\u4e00\u7bc7\u300aVim tutorial\u300b\uff0c\u53d1\u73b0\u4e86\u4e00\u4e9b\u81ea\u5df1\u4e4b\u524d\u6ca1\u600e [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[43],"class_list":["post-1669","post","type-post","status-publish","format-standard","hentry","category-tools","tag-vim"],"views":3899,"_links":{"self":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/1669","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/comments?post=1669"}],"version-history":[{"count":0,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/1669\/revisions"}],"wp:attachment":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/media?parent=1669"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/categories?post=1669"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/tags?post=1669"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}