是否可以将 emacs minibuffer 移动到屏幕顶部? [英] is it possible to move the emacs minibuffer to the top of the screen?

查看:25
本文介绍了是否可以将 emacs minibuffer 移动到屏幕顶部?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开始在 30 英寸显示器上编写代码,我想知道是否可以在 emacs 中将迷你缓冲区移动到屏幕顶部?谷歌搜索没有显示任何内容.

I've started coding on a 30 inch monitor and am wondering if it's possible to move the minibuffer to the top of the screen in emacs? google searches aren't showing up anything.

干杯尼迈埃瑟里奇

推荐答案

查看 default-minibuffer-frameinitial-frame-alist 的文档变种听起来您可以为您的迷你缓冲区创建一个单独的帧(您可以将其放置在屏幕顶部),然后生成使用它的无迷你缓冲区的帧.

Have a look at the documentation for the default-minibuffer-frame and initial-frame-alist vars. It sounds like you may be able to have a separate frame for your minibuffer (which you could position at the top of the screen), and then generate minibufferless frames which utilise it.

请注意,在 initial-frame-alist 中声明如果该值需要一个没有迷你缓冲区的帧,而您没有自己创建一个迷你缓冲区帧,则会创建一个迷你缓冲区帧根据 minibuffer-frame-alist",这听起来正是所需要的.

Note that in initial-frame-alist it states that "If the value calls for a frame without a minibuffer, and you have not created a minibuffer frame on your own, a minibuffer frame is created according to minibuffer-frame-alist", which sounds like exactly what would be needed.

有多种方法可以保存和恢复框架配置,所以如果这样做有效,您可能会在 emacs 启动时自动重新创建布局.

There are ways of saving and restoring frame configurations, so if this worked you could probably recreate the layout automatically when emacs starts.


下面是使用此框架排列的非常基本的示例/概念验证.在使用它的帧被删除之前,不能删除小缓冲区帧.当然,当您执行诸如最大化编辑器框架之类的操作时,您会遇到麻烦,因此当然需要做一些工作来尝试使该系统以更无缝的方式工作.


Very basic example/proof-of-concept below for using this frame arrangement. The minibuffer frame can't be deleted until the frames utilising it have been deleted. You'll run into trouble when you do things like maximising the editor frame, of course, so there would certainly be some work to do to try to make this system work in a more seamless fashion.

(setq default-minibuffer-frame
      (make-frame
       '((name . "minibuffer")
         (width . 80)
         (height . 1)
         (minibuffer . only)
         (top . 0)
         (left . 0)
         )))
(setq new-frame
      (make-frame
       '((name . "editor")
         (width . 80)
         (height . 30)
         (minibuffer . nil)
         (top . 50)
         (left . 0)
         )))

当然,您也可以将其与 scottfrazer 将模式行移至顶部的方法结合使用.

Naturally, you can also combine this with scottfrazer's method of moving the modeline to the top.

这可以在window-setup-hook中处理吗?

您还应该查看内置的 frame.el 和 dframe.el 库.像 dframe-reposition-frame 这样的函数可以提供一种方便的方式来保持迷你缓冲区帧附加"到活动编辑帧的顶部.

You should also look at the built-in frame.el and dframe.el libraries. Functions like dframe-reposition-frame may provide a convenient way of keeping the minibuffer frame 'attached' to the top of the active editing frame.

变量 minibuffer-auto-raise 也可以配置为在 minibuffer 被激活时提升 minibuffer 帧,这可以减少在其余时间让它可见的需要.

The variable minibuffer-auto-raise can also be configured to raise the minibuffer frame whenever the minibuffer is activated, which may mitigate the need to have it visible the rest of the time.

这篇关于是否可以将 emacs minibuffer 移动到屏幕顶部?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆