{"id":309,"date":"2007-11-14T01:29:47","date_gmt":"2007-11-14T06:29:47","guid":{"rendered":"http:\/\/blogs.n1zyy.com\/n1zyy\/2007\/11\/14\/vim-trick-of-the-day\/"},"modified":"2007-11-14T01:29:47","modified_gmt":"2007-11-14T06:29:47","slug":"vim-trick-of-the-day","status":"publish","type":"post","link":"https:\/\/blogs.n1zyy.com\/n1zyy\/2007\/11\/14\/vim-trick-of-the-day\/","title":{"rendered":"vim Trick of the Day"},"content":{"rendered":"<p>:g\/nbsp\/d<\/p>\n<p>That command sets up a &#8220;range&#8221; of all lines (hence the g for global) that match &#8220;nbsp&#8221;, and runs the command &#8220;d&#8221; (delete) on them.<\/p>\n<p>I&#8217;m working with a file that was converted by a script from HTML, but had some carryovers that were whole unnecessary lines&#8230; No lines with &#8216;desirable&#8217; content had the nbsp in them, just the junk ones. So we delete them all.<\/p>\n<p>Kudos to <a href=\"http:\/\/www.lagmonster.org\/docs\/vi.html\">this site<\/a> for the inspiration.<\/p>","protected":false},"excerpt":{"rendered":"<p>:g\/nbsp\/d That command sets up a &#8220;range&#8221; of all lines (hence the g for global) that match &#8220;nbsp&#8221;, and runs the command &#8220;d&#8221; (delete) on them. I&#8217;m working with a file that was converted by a script from HTML, but &hellip; <a href=\"https:\/\/blogs.n1zyy.com\/n1zyy\/2007\/11\/14\/vim-trick-of-the-day\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,5,13,22],"tags":[],"class_list":["post-309","post","type-post","status-publish","format-standard","hentry","category-computers","category-cool-links","category-linux-tips","category-programming"],"_links":{"self":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts\/309","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/comments?post=309"}],"version-history":[{"count":0,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts\/309\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/media?parent=309"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/categories?post=309"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/tags?post=309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}