{"id":717,"date":"2009-03-12T02:32:22","date_gmt":"2009-03-12T07:32:22","guid":{"rendered":"http:\/\/blogs.law.harvard.edu\/hoanga\/?p=717"},"modified":"2009-03-12T02:32:22","modified_gmt":"2009-03-12T07:32:22","slug":"insert-the-current-filename-into-current-edited-file-in-vim","status":"publish","type":"post","link":"https:\/\/archive.blogs.harvard.edu\/hoanga\/2009\/03\/12\/insert-the-current-filename-into-current-edited-file-in-vim\/","title":{"rendered":"Insert the current filename into current edited file in vim"},"content":{"rendered":"<p>I had a need for inserting the name of the current file into a bunch of files I was editing.  I was pretty sure there was a function to do this in vim and after some searching I was right.<\/p>\n<p>To insert the current filename.  In Insert Mode, type <em>CTRL-r<\/em> <em>%<\/em> and it will insert the current filename.<\/p>\n<p>Thanks to <a href=\"http:\/\/mamchenkov.net\/wordpress\/2006\/08\/15\/vim-tip-quickly-insert-current-filename\/\">blog post<\/a> for the tip!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had a need for inserting the name of the current file into a bunch of files I was editing. I was pretty sure there was a function to do this in vim and after some searching I was right. To insert the current filename. In Insert Mode, type CTRL-r % and it will insert [&hellip;]<\/p>\n","protected":false},"author":703,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1216,1101,972,260],"tags":[],"class_list":["post-717","post","type-post","status-publish","format-standard","hentry","category-fixes","category-geek","category-programming","category-tech"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/posts\/717","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/users\/703"}],"replies":[{"embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/comments?post=717"}],"version-history":[{"count":0,"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/posts\/717\/revisions"}],"wp:attachment":[{"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/media?parent=717"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/categories?post=717"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/hoanga\/wp-json\/wp\/v2\/tags?post=717"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}