Add split-other-window commands
This commit is contained in:
parent
b810decdf2
commit
f98cd82f95
23
config.org
23
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user