Skip to content
jackkamm edited this page Feb 28, 2020 · 8 revisions

Intro

Have pop-to-buffer or display-buffer use ace-window to select its window.

See #187.

Sample config

(setq display-buffer-base-action
      '((display-buffer-reuse-window
         ace-display-buffer)))

(setq display-buffer-alist `(("\\*help\\[R" (display-buffer-reuse-mode-window
                                             ace-display-buffer)
                              (reusable-frames . nil))
                             ("\\*R" nil (reusable-frames . nil))
                             ,(cons "\\*helm" display-buffer-fallback-action)
                             ("magit-diff:" nil
                              (inhibit-same-window . t))))

Explanation of sample config:

  • display-buffer-base-action: Set the default display-buffer action to reuse an existing window already displaying the buffer; if no such window exists, use ace-window to select a window.
  • display-buffer-alist: Add further tweaks for helm, magit, and R/ESS.
    • Helm: Don’t use ace-display-buffer for Helm windows, use the original default actions instead.
    • Magit: Don’t allow magit-diff buffers to select the current window. This prevents accidentally covering up the COMMIT_MSG window.
    • R/ESS: Revert ESS’s configuration of reusable-frames, so that we only pop up windows in the current frame.
Clone this wiki locally