{"id":258,"date":"2011-09-18T11:19:24","date_gmt":"2011-09-18T15:19:24","guid":{"rendered":"http:\/\/irreal.org\/blog\/?p=258"},"modified":"2011-12-26T18:03:05","modified_gmt":"2011-12-26T23:03:05","slug":"the-emacs-goto-line-command","status":"publish","type":"post","link":"https:\/\/irreal.org\/blog\/?p=258","title":{"rendered":"The Emacs <code>goto-line<\/code> Command"},"content":{"rendered":"\n<p>As I&#8217;ve <a href=\"http:\/\/irrealblog.blogspot.com\/2009\/07\/dragged-kicking-and-screaming-to-emacs.html\">written<\/a> <a href=\"http:\/\/irrealblog.blogspot.com\/2009\/07\/dragged-kicking-and-screaming-to-emacs_13.html\">before<\/a>, I came to Emacs after years as a Vi\/Vim user. One of the things I was used to doing in Vim was to go to line <i>N<\/i> in a file by typing <code>:<i>N<\/i><\/code> in command mode. I learned Emacs mostly by referring to the Emacs Reference Card that&#8217;s included with the distribution and, unfortunately, the reference card does not mention any way of jumping to a particular line. Over time I evolved some dopey way of doing it, probably \u3010<span class=\"key\">Meta<\/span>+<span class=\"key\">&lt;<\/span> <span class=\"key\">Ctrl<\/span>+<span class=\"key\"><i>N<\/i><\/span> <span class=\"key\">Ctrl<\/span>+<span class=\"key\">n<\/span>\u3011 or something equally horrible. <\/p>\n<p> Eventually, I discovered the answer hidden away in the <code>Edit\u2192Go To<\/code> menu. The official way is \u3010<span class=\"key\">Meta<\/span>+<span class=\"key\">g<\/span> <span class=\"key\">g<\/span>\u3011 to bring up the <code>Go To Line:<\/code> prompt in the minibuffer but \u3010<span class=\"key\">Meta<\/span>+<span class=\"key\">g<\/span> <span class=\"key\">Meta<\/span>+<span class=\"key\">g<\/span>\u3011 also works and is easier to type. Mac OS X users can use \u3010<span class=\"key\">\u2318 Cmd<\/span>+<span class=\"key\">l<\/span>\u3011 if they prefer. <\/p>\n<p> None of this is earth shattering and perhaps I&#8217;m the only Emacs user who didn&#8217;t know it but I am writing it down in case someone else out there is also wondering how to do it. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>As I&#8217;ve written before, I came to Emacs after years as a Vi\/Vim user. One of the things I was used to doing in Vim was to go to line N in a file by typing :N in command mode. &hellip; <a href=\"https:\/\/irreal.org\/blog\/?p=258\">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-258","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\/258","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=258"}],"version-history":[{"count":1,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/258\/revisions"}],"predecessor-version":[{"id":477,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/258\/revisions\/477"}],"wp:attachment":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=258"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=258"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}