• 0 Posts
  • 3 Comments
Joined 1 year ago
cake
Cake day: October 17th, 2023

help-circle
  • I think that preferences for display-buffer-alist will depend on each user’s workflow. With my rule it will pop up magit-status in the currently active window, then split to show logs, diffs, etc. I don’t normally use more than two windows per frame, so it’s not too bad if it messes things up, but I haven’t noticed it doing that. If it does do something weird, I just use winner-undo until I get back to where I was. For this you have to have (winner-mode) somewhere in your config or start it manually I guess.

    For instance, if you had two windows in a vertical split like A | B with point in A, then run magit-status, A will show magit and B won’t change unless you run something like magit-log. Pressing q in the log window will restore B to what it was showing before.

    Changing this behavior is probably possible, but I’m satisfied with this so far.



  • (add-to-list 'display-buffer-alist
                 '("\\*sly-mrepl"
                   (display-buffer-at-bottom)
                   (window-height . 12)))
    (add-to-list 'display-buffer-alist
                 '("\\*Calendar*"
                   (display-buffer-at-bottom)))
    (add-to-list 'display-buffer-alist
                 '("\\*shell:"
                   (display-buffer-below-selected)
                   (window-height . 12)))
    (add-to-list 'display-buffer-alist
                 '("\\magit:"
                   (display-buffer-same-window)))
    (add-to-list 'display-buffer-alist
                 '("\\*Man"
                   (display-buffer-same-window)))
    (add-to-list 'display-buffer-alist
                 '("\\*Help"
                   (display-buffer-same-window)))
    (add-to-list 'display-buffer-alist
                 '("\\*helpful"
                   (display-buffer-same-window)))