This allows you to be working with split windows on a project, start magit in full-screen with magit-status
, and return to your previous configuration after quitting magit with q
.
(defadvice magit-status (around magit-fullscreen activate)
(window-configuration-to-register :magit-fullscreen)
ad-do-it
(delete-other-windows))
(defadvice magit-mode-quit-window (around magit-restore-screen activate)
ad-do-it
(jump-to-register :magit-fullscreen))
Also possible with monky
for those using Mercurial:
(defadvice monky-status (around monky-fullscreen activate)
(window-configuration-to-register :monky-fullscreen)
ad-do-it
(delete-other-windows))
(defadvice monky-quit-window (around monky-restore-screen activate)
ad-do-it
(jump-to-register :monky-fullscreen))