Search code examples
emacsmagit

how to make magit respect the current window layout


Suppose I have a vertical split in the current frame where I have two windows, left and right. Now I invoke M-x magit-status in the left window.

  • what happens: magit takes over the whole frame

  • what I'd like to happen: magit should take over only the left window from where I originally invoked M-x magit-status.

how do I achieve the desired behaviour? Is it even Possible?

thanks in advance.


Solution

  • Magit doesn't do this by default. You are probably using a starter-kit, Spacemacs maybe?

    This is controlled using the option magit-display-buffer-function. Check out its documentation.