Clean up split-windows functions
This commit is contained in:
parent
bb31c86a5f
commit
a6410697d2
1 changed files with 12 additions and 13 deletions
|
@ -34,25 +34,24 @@
|
|||
(interactive "nHow many splits? ")
|
||||
(delete-other-windows)
|
||||
(let ((width (/ (window-total-width) count-windows)))
|
||||
(let ((count 0))
|
||||
(while (< count (1- count-windows))
|
||||
(split-window-right (- 0 width))
|
||||
(setf count (1+ count))))))
|
||||
(dotimes (i (1- count-windows))
|
||||
(split-window-right (- width)))))
|
||||
|
||||
(defun me/split-windows-vertical (count-windows)
|
||||
"Split windows vertical by equal width."
|
||||
(interactive "nHow many splits? ")
|
||||
(delete-other-windows)
|
||||
(let ((height (/ (window-total-height) count-windows)))
|
||||
(dotimes (i (1- count-windows))
|
||||
(split-window-below (- height)))))
|
||||
|
||||
(defun me/split-h3 ()
|
||||
(interactive)
|
||||
(me/split-windows-horizontal 3))
|
||||
|
||||
(defun me/split-windows-vertical ()
|
||||
"Split windows vertical by equal width."
|
||||
(defun me/split-v3 ()
|
||||
(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)))))
|
||||
(me/split-windows-vertical 3))
|
||||
|
||||
(add-to-list 'org-latex-classes
|
||||
'("koma-article"
|
||||
|
|
Loading…
Add table
Reference in a new issue