{"id":1306,"date":"2008-09-18T11:50:31","date_gmt":"2008-09-18T16:50:31","guid":{"rendered":"http:\/\/blogs.terrorware.com\/geoff\/2008\/09\/18\/vim-cheatsheet\/"},"modified":"2008-09-18T10:50:26","modified_gmt":"2008-09-18T15:50:26","slug":"vim-cheatsheet","status":"publish","type":"post","link":"http:\/\/blogs.terrorware.com\/geoff\/2008\/09\/18\/vim-cheatsheet\/","title":{"rendered":"vim cheatsheet"},"content":{"rendered":"<h3>Extracting from a vimball<\/h3>\n<p>From <a href=\"http:\/\/vim.sourceforge.net\/scripts\/script.php?script_id=1502\">http:\/\/vim.sourceforge.net\/scripts\/script.php?script_id=1502<br \/>\n<\/a><\/p>\n<blockquote><p>Users of a vimball archive simply need to<\/p>\n<p>:vim something.vba<br \/>\n:so %<\/p>\n<p>and the contents of the vimball will be extracted and placed into the proper directories, no matter where the user opened up the vimball.  Furthermore, the helptags command will be automatically and transparently used to make any doc\/*.txt files&#8217; contents available by the Vim help system.<\/p><\/blockquote>\n<h3>Getting the filename of the currently edited file<\/h3>\n<p>From <a href=\"http:\/\/rayninfo.co.uk\/vimtips.html\">http:\/\/rayninfo.co.uk\/vimtips.html<\/a>:<\/p>\n<blockquote>\n<pre>:!echo %:p                        : full path &amp; file name\r\n:!echo %:p:h                      : full path only\r\n:!echo %:t                        : filename only<\/pre>\n<\/blockquote>\n<h3>Removing empty lines<\/h3>\n<p>From <a href=\"http:\/\/vim.wikia.com\/wiki\/VimTip72\">Vim Tip 72<\/a>:<\/p>\n<blockquote>\n<pre>\u00c2\u00a0:g\/^$\/d<\/pre>\n<\/blockquote>\n<h3>Converting select text to lowercase<\/h3>\n<p>In visual mode, select text.\u00c2\u00a0 Then type the <em>u<\/em> key.<\/p>\n<blockquote><\/blockquote>\n<pre><\/pre>\n<blockquote><\/blockquote>\n<p><a href=\"http:\/\/vim.sourceforge.net\/scripts\/script.php?script_id=1502\"><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Extracting from a vimball From http:\/\/vim.sourceforge.net\/scripts\/script.php?script_id=1502 Users of a vimball archive simply need to :vim something.vba :so % and the contents of the vimball will be extracted and placed into the proper directories, no matter where the user opened up the vimball. Furthermore, the helptags command will be automatically and transparently used to make any&hellip; <a class=\"more-link\" href=\"http:\/\/blogs.terrorware.com\/geoff\/2008\/09\/18\/vim-cheatsheet\/\">Continue reading <span class=\"screen-reader-text\">vim cheatsheet<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,5],"tags":[427,285,426],"class_list":["post-1306","post","type-post","status-publish","format-standard","hentry","category-note-to-self","category-howto","tag-cheatsheet","tag-recipes","tag-vim","entry"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4wnIz-l4","_links":{"self":[{"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/posts\/1306","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/comments?post=1306"}],"version-history":[{"count":0,"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/posts\/1306\/revisions"}],"wp:attachment":[{"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/media?parent=1306"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/categories?post=1306"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blogs.terrorware.com\/geoff\/wp-json\/wp\/v2\/tags?post=1306"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}