Created
July 25, 2012 20:50
-
-
Save magnars/3178597 to your computer and use it in GitHub Desktop.
Saner magit quit
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
;; full screen magit-status | |
(defadvice magit-status (around magit-fullscreen activate) | |
(window-configuration-to-register :magit-fullscreen) | |
ad-do-it | |
(delete-other-windows)) | |
(defun magit-quit-session () | |
"Restores the previous window configuration and kills the magit buffer" | |
(interactive) | |
(kill-buffer) | |
(jump-to-register :magit-fullscreen)) | |
(define-key magit-status-mode-map (kbd "q") 'magit-quit-session) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment