From f98cd82f952c8a1115f813e74c29ff75c510648f Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Fri, 26 Feb 2021 19:23:36 -0600 Subject: Add split-other-window commands --- config.org | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/config.org b/config.org index ac4f360..43096c1 100644 --- a/config.org +++ b/config.org @@ -217,6 +217,29 @@ I want to select the *Help* window by default, so I can easily quit it. (setq-default help-window-select t) #+end_src +*** Split and switch + +from [[https://github.com/danielmai/.emacs.d/blob/master/config.org#window][Daniel Mai]], though I've seen it before. + +#+begin_src emacs-lisp :noweb-ref functions + (defun vsplit-other-window () + "Split the window vertically and switch to the new window." + (interactive) + (split-window-vertically) + (other-window 1 nil)) + + (defun hsplit-other-window () + "Split the window horizontally and switch to the new window." + (interactive) + (split-window-horizontally) + (other-window 1 nil)) +#+end_src + +#+begin_src emacs-lisp :noweb-ref bindings + (acdw/bind "C-x 2" #'vsplit-other-window) + (acdw/bind "C-x 3" #'hsplit-other-window) +#+end_src + ** Buffers *** Uniquify buffers -- cgit 1.4.1-21-gabe81