diff --git a/bundle/bundle--mk.el b/bundle/bundle--mk.el index 0676e65b..afda3799 100644 --- a/bundle/bundle--mk.el +++ b/bundle/bundle--mk.el @@ -7,3 +7,27 @@ (olivetti-mode) (defvar mode-line-format-current (symbol-value 'mode-line-format))) + +(defun me/split-windows-horizontal () + "Split windows horizontal by equal width." + (interactive) + (setq count-windows 3) + (delete-other-windows) + (let ((width (/ (window-total-width) count-windows))) + (setq count 0) + (while (< count (1- count-windows)) + (split-window-right (- 0 width)) + (setq count (1+ count))))) + +(defun me/split-windows-vertical () + "Split windows vertical by equal width." + (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-horizontal) diff --git a/init.el b/init.el index 05ff43e5..55319f17 100755 --- a/init.el +++ b/init.el @@ -33,27 +33,3 @@ (put 'narrow-to-page 'disabled nil) (load "bundle--mk") - -(defun me/split-windows-horizontal () - "Split windows horizontal by equal width." - (interactive) - (setq count-windows 3) - (delete-other-windows) - (let ((width (/ (window-total-width) count-windows))) - (setq count 0) - (while (< count (1- count-windows)) - (split-window-right (- 0 width)) - (setq count (1+ count))))) - -(me/split-windows-horizontal) - -(defun me/split-windows-vertical () - "Split windows vertical by equal width." - (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)))))