Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open magit-status in full window

Tags:

emacs

magit

I am using Magit to work with git in emacs. I have bound magit-status to a key, but every time I hit the key it opens in a split in lower half of the window and i have to hit C-x 1 to get it into a full window. How can I make it open in a full window by default?

like image 382
Mad Wombat Avatar asked Feb 24 '12 23:02

Mad Wombat


3 Answers

(setq magit-status-buffer-switch-function 'switch-to-buffer)

or via customize:

M-x customize-variable RET magit-status-buffer-switch-function RET

like image 164
phils Avatar answered Nov 16 '22 17:11

phils


For newer versions of Magit you can use this sanctioned snippet:

(setq magit-display-buffer-function #'magit-display-buffer-fullframe-status-v1)

I combine it with this to get a zen-like full window Git status after switching projects:

(setq projectile-switch-project-action 'magit-status)

like image 43
gondalez Avatar answered Nov 16 '22 16:11

gondalez


Here is another way to achieve this:

(add-to-list 'same-window-regexps "\*magit: .*\*")

like image 8
Bob Avatar answered Nov 16 '22 15:11

Bob