{"id":1,"date":"2022-09-26T23:01:24","date_gmt":"2022-09-26T23:01:24","guid":{"rendered":"https:\/\/blogs.oregonstate.edu\/rietz\/?p=1"},"modified":"2022-09-26T23:54:07","modified_gmt":"2022-09-26T23:54:07","slug":"hello-world","status":"publish","type":"post","link":"https:\/\/blogs.oregonstate.edu\/rietz\/2022\/09\/26\/hello-world\/","title":{"rendered":"Hello world!"},"content":{"rendered":"\n<p>For my first blog post, I think it is only appropriate that I am to blog about vim, the greatest text editor ever created and the reason that I am in this program today. I first started learning vim in about 2017 when I saw a guy on YouTube editing $\\LaTeX$ very fast. He was showing off his set up and I knew that I had to have that.<\/p>\n\n\n\n<p>It has been five years and I can say that I am a professional vim user, but I still learn new things all the time, even some features that are quite basic. Over the course of the last five years, I have developed muscle memory for accomplishing routine text editing tasks. It was not until watching another vim user that I realized that there are other, possibly more efficient ways, to accomplish the same task in vim. While watching The Primeagen on YouTube in this video https:\/\/www.youtube.com\/watch?v=uL9oOZStezw, I caught on to two different ways in that he does the same task as I do.<\/p>\n\n\n\n<p>I will share with you here the first task as it is easy to explain in text. Given a few lines of code like the following:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">| Header 1 | Header 2\n| ---      | ---\n| thing 1  | thing 2\n| thing 3  | thing 3\n<\/pre>\n\n\n\n<p>one may want to add a | character after each line to complete the markdown table. Normally, I would perform this series of steps<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Move the cursor to the end of the first line (where the &#8220;2&#8221; is)<\/li><li>Hit &#8220;ctrl-v&#8221; to go into visual block mode<\/li><li>Navigate the cursor to the &#8220;3&#8221; on the last line by using a series of movements<\/li><li>Then use the command <code>'&lt;,'&gt;norm A |<\/code> to append a | character to the end of each line<\/li><li>Use a vim plugin to align all text at the | character so my code looks good<\/li><\/ol>\n\n\n\n<p>I have found that The Primeagen does something different which uses less key strokes. <\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Hit <code>vip<\/code> to visual select the paragraph.<\/li><li>Use the command <code>'&lt;,'&gt;s\/$\/ |\/<\/code> to substitute the end of each line in the visually selected area with a space and a | character.<\/li><li>Use a vim plugin to align all text at the | character<\/li><\/ol>\n\n\n\n<p>Now that I have broken down the steps, I realize that in my first approach I could have also avoided visual block mode and used <code>vip<\/code> and the <code>norm<\/code> command works just the same. Now, spending the time to improve this tiny text editing habit that I have to perform at least once a day, I will shave off many seconds in my life!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For my first blog post, I think it is only appropriate that I am to blog about vim, the greatest text editor ever created and the reason that I am in this program today. I first started learning vim in about 2017 when I saw a guy on YouTube editing $\\LaTeX$ very fast. He was &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blogs.oregonstate.edu\/rietz\/2022\/09\/26\/hello-world\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Hello world!&#8221;<\/span><\/a><\/p>\n","protected":false},"author":12847,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.oregonstate.edu\/rietz\/wp-json\/wp\/v2\/posts\/1","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.oregonstate.edu\/rietz\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.oregonstate.edu\/rietz\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/rietz\/wp-json\/wp\/v2\/users\/12847"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/rietz\/wp-json\/wp\/v2\/comments?post=1"}],"version-history":[{"count":2,"href":"https:\/\/blogs.oregonstate.edu\/rietz\/wp-json\/wp\/v2\/posts\/1\/revisions"}],"predecessor-version":[{"id":6,"href":"https:\/\/blogs.oregonstate.edu\/rietz\/wp-json\/wp\/v2\/posts\/1\/revisions\/6"}],"wp:attachment":[{"href":"https:\/\/blogs.oregonstate.edu\/rietz\/wp-json\/wp\/v2\/media?parent=1"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/rietz\/wp-json\/wp\/v2\/categories?post=1"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/rietz\/wp-json\/wp\/v2\/tags?post=1"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}