Running Magit In Full Screen Redux

Life goes on and things change. Over 10 years ago, I wrote about a hack to run Magit in full screen mode. The hack—apparently from Magnar Sveen originally—was pretty simple. Here it is:

(eval-after-load 'magit
  '(progn
     (defadvice magit-status (around magit-fullscreen activate)
       (window-configuration-to-register :magit-fullscreen)
       ad-do-it
       (delete-other-windows))

     (defadvice magit-mode-quit-window (after magit-restore-screen activate)
       (jump-to-register :magit-fullscreen))))

You can tell it’s old because it uses the now deprecated defadvice.

I just read a post from Jeremy Friesen that does the same thing but in a more modern way. It takes advantage of some variables specifically provided for this type of thing. Take a look at Friesen’s post for the details. The TL;DR is that it’s even shorter than my version and probably protected from going out of date. It’s a nice solution.

On the other hand, my solution is, in a sense, universally applicable. You can, as I have, use it, mutatis mutandis, in a variety of situations. I use it, for example, to run eshell in full screen mode. Once you understand how it works, it’s easy to apply to any situation where you want to run something in full screen, even if the function doesn’t provide a special mechanism for it.

Regardless, if you’re lookng for a way to fun Magit in full screen (actually, in full window) mode, take a look at Friesen’s post for any easy way of doing so. It’s a good post and it’s short so it will take no time at all to read.

This entry was posted in General and tagged . Bookmark the permalink.