Add split-other-window commands

This commit is contained in:
Case Duckworth 2021-02-26 19:23:36 -06:00
parent b810decdf2
commit f98cd82f95

View File

@ -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