all repos — nixfiles @ c0358d70a3715b1af00c0411237427fd8ca3d3a7

System and user configuration, managed by nix and home-manager

Emacs: split windows horizontally, never vertically

Alan Pearce
commit

c0358d70a3715b1af00c0411237427fd8ca3d3a7

parent

d29a564b00f48b64ecbc695a59fa5f14828f977d

1 file changed, 16 insertions(+), 0 deletions(-)

jump to
M emacs/.emacs.d/main.elemacs/.emacs.d/main.el
@@ -165,6 +165,21 @@ :general ("M-x" #'counsel-M-x))
;;; Windows +(defun split-window-properly (&optional window) + (let ((window (or window (selected-window)))) + (or (and (window-splittable-p window) + ;; Split window vertically. + (with-selected-window window + (split-window-below))) + (and (window-splittable-p window t) + ;; Split window horizontally. + (with-selected-window window + (split-window-right)))))) + +(setq split-window-preferred-function #'split-window-properly + split-height-threshold nil + split-width-threshold 160) + (use-package eyebrowse :after (evil) :custom ((eyebrowse-new-workspace #'counsel-projectile-switch-project)
@@ -284,6 +299,7 @@ :commands (magit-status magit-dispatch)
:custom ((global-magit-file-mode +1) (magit-section-visibility-indicator nil) (magit-diff-refine-hunk 'all) + (magit-display-buffer-function #'display-buffer) (magit-completing-read-function #'ivy-completing-read)) :config (progn (remove-hook 'magit-section-highlight-hook 'magit-section-highlight)