From: Mark Wooding Date: Sun, 3 Oct 2021 14:00:21 +0000 (+0100) Subject: dot/emacs: Move the cursor properly. X-Git-Url: https://git.distorted.org.uk/~mdw/profile/commitdiff_plain/3b361ad218cb4463349c91f10117c29972b8a24c dot/emacs: Move the cursor properly. Vertical motion is by visual lines, because this allows more fine-grained motion -- and not for any deep philosophical reason, because the arguments from principle are all in favour of motion by logical lines. Move the cursor visually horizontally when the cursor keys are pressed, but in buffer order when the traditional C-b/C-f keys are used. This makes most sense to me when I'm trying to edit mixed-direction text. It probably won't suit anyone else. --- diff --git a/dot/emacs b/dot/emacs index 370cfee..d67444e 100644 --- a/dot/emacs +++ b/dot/emacs @@ -389,6 +389,8 @@ (setq-default comment-column 40) ;Set a standard comment column (setq-default truncate-partial-width-windows nil truncate-lines t) +(setq line-move-visual t + visual-order-cursor-movement t) (setq default-indicate-empty-lines t) (setq view-read-only t) (setq-default view-exit-action #'kill-buffer)