Emacsist RSS --- If never, make it ever: C-h C-h

Show Magit Status window in fullscreen

7483

这里 查看更多 Emacs 相关推荐文章最新 Emacs 圈的动态. 欢迎关注微信公众账号: Emacsist

When I moved back to my own Emacs configuration from Spacemacs one thing that I missed most was to have Magit’s status window cover the whole frame.

Luckily this feature is easy to reproduce with a simple entry in[display-buffer-alist](http://www.lunaryorn.com/2015/04/29/the-power-of-display-buffer-alist.html):

(add-to-list 'display-buffer-alist
             `(,(rx "*magit: ")
               (lunaryorn-display-buffer-fullframe)
               (reusable-frames . nil)))

Unfortunately there’s no built-in display function to show a window covering the whole frame but it’s easy enough to write one:

(defun lunaryorn-display-buffer-fullframe (buffer alist)
  "Display BUFFER in fullscreen.

ALIST is a `display-buffer' ALIST.

Return the new window for BUFFER."
  (let ((window (display-buffer-pop-up-window buffer alist)))
    (when window
      (delete-other-windows window))
    window))

We simply need to get hold of any arbitrary window for the buffer, and then just delete all other windows, leaving only the window for our buffer.

That’s it. Enjoy and share :)

原文出处: Sebastian Wiesner
原文地址: http://www.lunaryorn.com/2016/04/28/fullscreen-magit-status.html
原文时间: 2016-04-28 06:00
本文地址: http://emacsist.com/10875
整理时间: 2016-06-05 21:35

本文由 Hick 整理,转载请保留以上信息;
COPYLEFTThe articles on this site come from Internet, thanks to all the original authors.
      If anything about COPYRIGHT, or LEFT, please contact Emacsist at gmail dot com .