{"id":1491,"date":"2012-12-11T08:49:00","date_gmt":"2012-12-11T13:49:00","guid":{"rendered":"http:\/\/irreal.org\/blog\/?p=1491"},"modified":"2012-12-12T05:31:32","modified_gmt":"2012-12-12T10:31:32","slug":"solution-to-yesterdays-challenge","status":"publish","type":"post","link":"https:\/\/irreal.org\/blog\/?p=1491","title":{"rendered":"Solution To Yesterday&#8217;s Challenge"},"content":{"rendered":"<p><a href=\"http:\/\/irreal.org\/blog\/?p=1489\">Yesterday&#8217;s<\/a> post asked you to turn 26 lines of<\/p>\n<pre class=\"example\">a b c d e f g h i j k l m n o p q r s t u v w x y z<\/pre>\n<p>into 26 lines of<\/p>\n<pre class=\"example\">a    b    c    d    e    f    g    h    i    j    k    l    m    n    o    p    q    r    s    t    u    v    w    x    y    z<\/pre>\n<p>by replacing the blanks with a series of 4 blanks.<\/p>\n<p>The best Vim solution (13 keystrokes ignoring the file saving) on the <a href=\"http:\/\/vimgolf.com\/challenges\/50be61aea748a30002000047\">VimGolf site<\/a> uses a substitute operation to replace a single blank with 4 blanks. If we use the same strategy in Emacs we get<\/p>\n<table border=\"2\" frame=\"hsides\" rules=\"groups\" cellspacing=\"0\" cellpadding=\"6\">\n<colgroup>\n<col class=\"left\" \/> <\/colgroup>\n<tbody>\n<tr class=\"tr-odd\">\n<td class=\"left\">\u3010<kbd>Meta<\/kbd>+<kbd>%<\/kbd>\u3011<\/td>\n<\/tr>\n<tr class=\"tr-even\">\n<td class=\"left\">\u3010<kbd>\u2423<\/kbd> <kbd>Return<\/kbd>\u3011<\/td>\n<\/tr>\n<tr class=\"tr-odd\">\n<td class=\"left\">\u3010<kbd>\u2423<\/kbd> <kbd>\u2423<\/kbd> <kbd>\u2423<\/kbd> <kbd>\u2423<\/kbd> <kbd>Return<\/kbd>\u3011<\/td>\n<\/tr>\n<tr class=\"tr-even\">\n<td class=\"left\">\u3010<kbd>!<\/kbd>\u3011<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>for 9 keystrokes. That&#8217;s good but if we replace \u3010<kbd>\u2423<\/kbd> <kbd>\u2423<\/kbd> <kbd>\u2423<\/kbd> <kbd>\u2423<\/kbd>\u3011 with \u3010<kbd>Ctrl<\/kbd>+<kbd>4<\/kbd> <kbd>\u2423<\/kbd>\u3011 we get it down to 7.<\/p>\n<p><b>Update<\/b>: \u3010<kbd>Ctrl<\/kbd>\u3011 \u2192 \u3010<kbd>Meta<\/kbd>\u3011<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yesterday&#8217;s post asked you to turn 26 lines of a b c d e f g h i j k l m n o p q r s t u v w x y z into 26 lines of a &hellip; <a href=\"https:\/\/irreal.org\/blog\/?p=1491\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[18],"class_list":["post-1491","post","type-post","status-publish","format-standard","hentry","category-general","tag-emacs"],"_links":{"self":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1491","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1491"}],"version-history":[{"count":10,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1491\/revisions"}],"predecessor-version":[{"id":1515,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1491\/revisions\/1515"}],"wp:attachment":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1491"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1491"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1491"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}