Add custom function to split windows in emacs

This commit is contained in:
Marcus Kammer 2020-08-05 08:40:28 +02:00
parent df187c3cdd
commit 45b10a249a

10
init.el
View file

@ -29,3 +29,13 @@
(put 'narrow-to-page 'disabled nil)
(load "bundle--mk")
(defun me/split-windows-horizontal ()
; Split windows horizontal by equal width
(interactive)
(defvar count-windows 3)
(let ((width (/ (window-total-width) count-windows)))
(defvar count 0)
(while (< count count-windows)
(split-window-right (- 0 width))
(setq count (1+ count)))))