{"id":9058,"date":"2020-08-06T12:45:52","date_gmt":"2020-08-06T16:45:52","guid":{"rendered":"https:\/\/irreal.org\/blog\/?p=9058"},"modified":"2020-08-06T12:45:52","modified_gmt":"2020-08-06T16:45:52","slug":"rolling-your-own-emacs-modal-mode","status":"publish","type":"post","link":"https:\/\/irreal.org\/blog\/?p=9058","title":{"rendered":"Rolling Your Own Emacs Modal Mode"},"content":{"rendered":"<p>Lukas Lazarek has a very interesting post that details <a href=\"https:\/\/llazarek.com\/2018\/07\/modal-editing-in-emacs.html\">how he implemented his own evil-like mode<\/a> for Emacs. Lazarek begins by describing the difference between Emacs and Vim. His distinction is much like mine: Vim wants to be a lightweight, fast editor and nothing else, while Emacs wants to be a text-based programming environment. I usually express that as Emacs being a lightweight Lisp machine but the meaning is pretty much the same.<\/p>\n<p>Lazarek says the big advantage of Vim is its modal editing. I like modal editing but I see it as more something you\u2019re used to rather than an actual advantage (unless we\u2019re talking about RSI, which Lazarek does appear to be) but I don\u2019t see it as an advantage. For me, the real advantage of Vim is not that it\u2019s modal but that its command set is composable. I\u2019ve <a href=\"http:\/\/irreal.org\/blog\/?p=2750\">written about this before<\/a>.<\/p>\n<p>Regardless, Lazarek wanted to implement a modal mode but didn\u2019t want the exact Vim experience that Evil offers. It might seem like implementing your own Evil mode would be a significant undertaking but Lazarek demonstrates how simple it is by showing a short bit of Elisp that provides an \u201cEvil mode\u201d that merely implements the <code>jklh<\/code> cursor movement commands. It really <i>is<\/i> amazingly simple.<\/p>\n<p>He also provides a link to his full implementation. It\u2019s longer, of course, but still pretty simple and very easy to understand. That last clause is, I think, the main takeaway. It\u2019s really easy to customize Emacs even in ways that seem complicated and outr\u00e9. As always, Emacs lets you have it your way and often fairly easily.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Lukas Lazarek has a very interesting post that details how he implemented his own evil-like mode for Emacs. Lazarek begins by describing the difference between Emacs and Vim. His distinction is much like mine: Vim wants to be a lightweight, &hellip; <a href=\"https:\/\/irreal.org\/blog\/?p=9058\">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-9058","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\/9058","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=9058"}],"version-history":[{"count":1,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9058\/revisions"}],"predecessor-version":[{"id":9059,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9058\/revisions\/9059"}],"wp:attachment":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9058"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9058"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9058"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}