Created
April 18, 2017 14:40
-
-
Save drcode/21ae3a66d47d0cffe4539c9b8d34897a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun split-window-multiple-ways (x y) | |
"Split the current frame into a grid of X columns and Y rows." | |
(interactive "nColumns: \nnRows: ") | |
;; one window | |
(delete-other-windows) | |
(dotimes (i (1- x)) | |
(split-window-horizontally) | |
(dotimes (j (1- y)) | |
(split-window-vertically)) | |
(other-window y)) | |
(dotimes (j (1- y)) | |
(split-window-vertically)) | |
(balance-windows)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment