From 7ab0fb4af78c2f2da0fc6de8c6b9b25c68ab3aa8 Mon Sep 17 00:00:00 2001 From: noa Date: Tue, 17 Sep 2024 10:12:50 +0800 Subject: Update shift click to select mouse bindings --- emacs/init.el | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'emacs/init.el') diff --git a/emacs/init.el b/emacs/init.el index fcbe172..80dca77 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -239,12 +239,9 @@ ;; deleting should be an explicit action delete-selection-mode nil) -;; Mouse selection - -;; Shift click to select region with the mouse. This annoyingly rings the bell for an error. It also interferes with my input method switcher, which doesn't notice the mouse click and thinks i've pressed shift with no other keys. - -(global-unset-key (kbd "S-")) -(global-set-key (kbd "S-") 'mouse-save-then-kill) +;; Shift click to select region with the mouse. I had a poor workaround for this before, but found an article (https://christiantietze.de/posts/2022/07/shift-click-in-emacs-to-select/) which shows me how to do it more pleasantly. In the same article i also discovered the existence of mouse-drag-secondary, which i think i will not make use of but is cool nonetheless. It also showed me mouse-drag-region-rectangle, which doesn't work great with a proportional font, but could still be useful. +(global-set-key (kbd "S-") #'mouse-set-mark) +(global-set-key (kbd "C-S-") #'mouse-drag-region-rectangle) ;;; Writing prose ;; The majority of the work i do in emacs is writing documents, so it's nice to know that the words coming out of my fingers are the ones i expect them to be. -- cgit 1.4.1-2-gfad0