Window splitting convenience functions

This commit is contained in:
laurensmiers 2018-06-13 00:54:24 +02:00
parent ad28328123
commit 51f232a9dd
2 changed files with 38 additions and 0 deletions

View file

@ -753,6 +753,29 @@ https://github.com/ikirill/irony-eldoc
)
#+END_SRC
* Windows
** Splitting
After you split a window, your focus remains in the previous one.
Credit goes to https://github.com/daedreth/UncleDavesEmacs
#+BEGIN_SRC emacs-lisp
(defun split-and-follow-horizontally ()
(interactive)
(split-window-below)
(balance-windows)
(other-window 1))
(global-set-key (kbd "C-x 2") 'split-and-follow-horizontally)
(defun split-and-follow-vertically ()
(interactive)
(split-window-right)
(balance-windows)
(other-window 1))
(global-set-key (kbd "C-x 3") 'split-and-follow-vertically)
#+END_SRC
* Avy
https://github.com/abo-abo/avy