about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-03-01 14:44:57 -0600
committerCase Duckworth2021-03-01 14:44:57 -0600
commit13d6cc6f8825cf4cd83da89d9a85d6cc1b7cc5ec (patch)
tree2669e163b1b7637bc8dd0115467a256047559268
parentAdd custom-file (diff)
downloademacs-13d6cc6f8825cf4cd83da89d9a85d6cc1b7cc5ec.tar.gz
emacs-13d6cc6f8825cf4cd83da89d9a85d6cc1b7cc5ec.zip
Add margin mouse binds
-rw-r--r--init.el19
1 files changed, 18 insertions, 1 deletions
diff --git a/init.el b/init.el index 6fc296b..eee0908 100644 --- a/init.el +++ b/init.el
@@ -269,9 +269,26 @@
269 (local-set-key (kbd "C-k") #'org-kill-line))) 269 (local-set-key (kbd "C-k") #'org-kill-line)))
270(add-hook 'visual-line-mode-hook #'hook--visual-line-fix-org-keys) 270(add-hook 'visual-line-mode-hook #'hook--visual-line-fix-org-keys)
271 271
272(dolist (margin '(right-margin left-margin))
273 (dolist (button '(mouse-1 mouse-2 mouse-3))
274 (global-set-key (vector margin button)
275 (global-key-binding (vector button)))))
276
277(mouse-wheel-mode +1)
278
279(when (bound-and-true-p mouse-wheel-mode)
280 (dolist (margin '(right-margin left-margin))
281 (dolist (event '(mouse-wheel-down-event
282 mouse-wheel-up-event
283 wheel-down
284 wheel-up
285 mouse-4
286 mouse-5))
287 (global-set-key (vector margin event) #'mwheel-scroll))))
288
272(use-package visual-fill-column 289(use-package visual-fill-column
273 :init (setq-default visual-fill-column-center-text t) 290 :init (setq-default visual-fill-column-center-text t)
274 :hook visual-fill-column-mode 291 (add-hook 'visual-fill-column-mode-hook #'visual-line-mode)
275 :config 292 :config
276 (advice-add 'text-scale-adjust :after #'visual-fill-column-adjust)) 293 (advice-add 'text-scale-adjust :after #'visual-fill-column-adjust))
277 294