diff --git a/emacs.d/ui.el b/emacs.d/ui.el index a23b9a8..70c4a14 100644 --- a/emacs.d/ui.el +++ b/emacs.d/ui.el @@ -89,3 +89,26 @@ :after corfu :config (add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter)) + +(use-package window + :bind + (([remap split-window-vertically] . gered/split-window-vertically) + ([remap split-window-horizontally] . gered/split-window-horizontally) + ("M-o" . other-window) + ("M-p" . gered/switch-to-previous-buffer) + ("M-}" . next-buffer) + ("M-{" . previous-buffer)) + :init + (defun gered/split-window-vertically () + (interactive) + (split-window-vertically) + (other-window 1 nil) + (switch-to-next-buffer)) + (defun gered/split-window-horizontally () + (interactive) + (split-window-horizontally) + (other-window 1 nil) + (switch-to-next-buffer)) + (defun gered/switch-to-previous-buffer () + (interactive) + (switch-to-buffer (other-buffer (current-buffer) 1))))