Add a second function to split windows vertical
This commit is contained in:
parent
423c0ba265
commit
e627bef53a
1 changed files with 12 additions and 1 deletions
13
init.el
13
init.el
|
@ -31,7 +31,7 @@
|
|||
(load "bundle--mk")
|
||||
|
||||
(defun me/split-windows-horizontal ()
|
||||
; Split windows horizontal by equal width
|
||||
"Split windows horizontal by equal width"
|
||||
(interactive)
|
||||
(setq count-windows 3)
|
||||
(delete-other-windows)
|
||||
|
@ -42,3 +42,14 @@
|
|||
(setq count (1+ count)))))
|
||||
|
||||
(me/split-windows-horizontal)
|
||||
|
||||
(defun me/split-windows-vertical ()
|
||||
"Split windows vertical by equal height"
|
||||
(interactive)
|
||||
(setq count-windows 3)
|
||||
(delete-other-windows)
|
||||
(let ((height (/ (window-total-height) count-windows)))
|
||||
(setq count 0)
|
||||
(while (< count (1- count-windows))
|
||||
(split-window-below (- 0 height))
|
||||
(setq count (1+ count)))))
|
||||
|
|
Loading…
Add table
Reference in a new issue