vfclists · 2022-10-25 07:11
I like to do `magit-stage-file` and go and commit just the file I'm working on immediately, but magit-status `C-x g` prefers to use a different window rather than the one of the file I'm editing.
Is there some option to change this?
yqrashawn · 2022-10-25 07:13
I think `magit-display-buffer-function` is what you are looking for.
mickeyp · 2022-10-25 08:35
You can indeed control this:
https://www.masteringemacs.org/article/demystifying-emacs-window-manager
I've an example for Magit further down.
invsblduck · 2022-10-29 22:17
Might be a crappy answer because I use Spacemacs and YMMV, but I have this behavior configured for myself and it wasn't the Spacemacs default.
The only relevant thing I see in my config is a customized variable, `magit-display-buffer-function`, which has the value `'magit-display-buffer-fullcolumn-most-v1`.
I did a quick Google search and that function is documented here: https://magit.vc/manual/magit/Switching-Buffers.html
The description reads somewhat poorly if not technically accurate, but I can attest that it DWIM 100% of the time. It's implemented really well, no surprise from u/tarsius_.