Skip to content

Instantly share code, notes, and snippets.

@magnars
Created July 25, 2012 20:50
Show Gist options
  • Save magnars/3178597 to your computer and use it in GitHub Desktop.
Save magnars/3178597 to your computer and use it in GitHub Desktop.
Saner magit quit
;; 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