Created
August 19, 2012 09:25
-
-
Save hamsolodev/3393945 to your computer and use it in GitHub Desktop.
This file contains 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
;; Toggle between split windows and a single window | |
(defun toggle-windows-split() | |
"Switch back and forth between one window and whatever split of | |
windows we might have in the frame. The idea is to maximize the | |
current buffer, while being able to go back to the previous split | |
of windows in the frame simply by calling this command again." | |
(interactive) | |
(if (not (window-minibuffer-p (selected-window))) | |
(progn | |
(if (< 1 (count-windows)) | |
(progn | |
(window-configuration-to-register ?u) | |
(delete-other-windows) | |
(set-fringe-style (cons 3 0))) | |
(progn | |
(jump-to-register ?u) | |
(set-fringe-style 0)))))) | |
(define-key global-map (kbd "s-\\") 'toggle-windows-split) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment