From 41647bdd45532d4b325f24d639c3db8876ae1b66 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 18 Oct 2021 08:26:55 -0700 Subject: emacs: select help buffer when it opens Configure how we want to open an help buffer (on the left, with a defined width), and let's jump to it. Enable =visual-line-mode= for help buffers, otherwise it's unreadable. --- emacs/custom/fcuny-ui.el | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'emacs/custom/fcuny-ui.el') diff --git a/emacs/custom/fcuny-ui.el b/emacs/custom/fcuny-ui.el index 487ca3c..0bdc494 100644 --- a/emacs/custom/fcuny-ui.el +++ b/emacs/custom/fcuny-ui.el @@ -94,4 +94,14 @@ (use-package posframe :ensure t) +(setq display-buffer-alist + `( + ("\\*\\(.* # Help.*\\|Help\\)\\*" ; See the hooks for `visual-line-mode' + (display-buffer-reuse-mode-window display-buffer-in-side-window) + (window-width . 0.35) + (side . left) + (slot . 0)))) + +(add-hook 'help-mode-hook #'visual-line-mode) + (provide 'fcuny-ui) -- cgit v1.2.3