{"id":12864,"date":"2025-03-22T11:07:26","date_gmt":"2025-03-22T15:07:26","guid":{"rendered":"https:\/\/irreal.org\/blog\/?p=12864"},"modified":"2025-03-22T11:07:26","modified_gmt":"2025-03-22T15:07:26","slug":"movement-commands","status":"publish","type":"post","link":"https:\/\/irreal.org\/blog\/?p=12864","title":{"rendered":"Movement Commands"},"content":{"rendered":"<p>\nOver that the Emacs reddit, arni_ca asks about <a href=\"https:\/\/www.reddit.com\/r\/emacs\/comments\/1jfnfl6\/ways_to_move_your_cursor_without_relying_on_the\/\">key bindings for cursor movement<\/a>. It&rsquo;s not quite clear what he&rsquo;s asking but the theme is moving the cursor without bindings like <kbd>Ctrl<\/kbd>+<kbd>f<\/kbd>, <kbd>Ctrl<\/kbd>+<kbd>b<\/kbd>,<br \/>\n<kbd>Meta<\/kbd>+<kbd>f<\/kbd>,<br \/>\n<kbd>Meta<\/kbd>+<kbd>b<\/kbd>,<br \/>\n<kbd>Ctrl<\/kbd>+<kbd>n<\/kbd>, and <kbd>Ctrl<\/kbd>+<kbd>p<\/kbd>.\n<\/p>\n<p>\nAs is often the case, all the juice is in the comments. It&rsquo;s astounding how many different strategies people have for such movements. They range from everything to using the arrow keys to custom Elisp snippets. Take a look at the post to see if any of the ideas will work for you.\n<\/p>\n<p>\nBy now, you all know my answer to questions like this. I started with <a href=\"https:\/\/sites.google.com\/site\/steveyegge2\/effective-emacs#h.p_ID_245\">this epiphany from Steve Yegge<\/a>: large scale navigation\u2014more than a few characters or lines\u2014should be made with search. It&rsquo;s perfectly obvious but it occurs to few of us until someone points it out. The wonderful <a href=\"https:\/\/github.com\/abo-abo\/avy\">avy package<\/a> refines this strategy and offers finer grained control of where the cursor ends up. Avy is probably my most used set of commands. I use them constantly as I write and edit. Following <a href=\"https:\/\/karthinks.com\/software\/avy-can-do-anything\/\">Karthinks<\/a>, I&rsquo;ve mostly pared my use down to <code>avy-goto-char-timer<\/code> although I do sometimes still use <code>avy-goto-word-1<\/code>. Regardless, if you aren&rsquo;t already using Avy, you should take a look.  It&rsquo;s the backbone of my navigation.\n<\/p>\n<p>\nThe other navigation tool I use is an import from Vim: <a href=\"https:\/\/github.com\/lewang\/jump-char\/tree\/master\">jump-char<\/a> that lets you jump to the next or previous instance of a character. It&rsquo;s  incredibly useful and, again, I use it several times a day. If you use Avy and Jump-char, you will have most of your navigation needs met.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Over that the Emacs reddit, arni_ca asks about key bindings for cursor movement. It&rsquo;s not quite clear what he&rsquo;s asking but the theme is moving the cursor without bindings like Ctrl+f, Ctrl+b, Meta+f, Meta+b, Ctrl+n, and Ctrl+p. As is often &hellip; <a href=\"https:\/\/irreal.org\/blog\/?p=12864\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[18],"class_list":["post-12864","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\/12864","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=12864"}],"version-history":[{"count":1,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/12864\/revisions"}],"predecessor-version":[{"id":12865,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/12864\/revisions\/12865"}],"wp:attachment":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12864"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12864"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12864"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}