diff --git a/emacs/.emacs.d/config/init-windows.el b/emacs/.emacs.d/config/init-windows.el index e577f18..9fa0fbc 100644 --- a/emacs/.emacs.d/config/init-windows.el +++ b/emacs/.emacs.d/config/init-windows.el @@ -28,6 +28,8 @@ (general-def evil-window-map "m" #'delete-other-windows + "S" #'split-root-window-below + "V" #'split-root-window-right "u" #'winner-undo "C-r" #'winner-redo) @@ -37,5 +39,18 @@ which-key-replacement-alist) (push '((nil . "select-window-[1-9]") . t) which-key-replacement-alist)) +;; Buffer and window layout management +(setopt switch-to-buffer-in-dedicated-window 'pop + switch-to-buffer-obey-display-actions t + display-buffer-alist '(("\\*Help\\*" (display-buffer-reuse-window + display-buffer-pop-up-window)) + ("\\*helpful .*\\*" (display-buffer-reuse-mode-window + display-buffer-pop-up-window)) + ("\\*vterm.*\\*" + (display-buffer-reuse-mode-window + display-buffer-pop-up-window) + (mode vterm-mode vterm-copy-mode)) + ("\\*Messages\\*" display-buffer-no-window (allow-no-window . t)) + ("\\*Warnings\\*" display-buffer-no-window (allow-no-window . t)))) (provide 'init-windows)