Coder Social home page Coder Social logo

ia-androsov / emacs-mini-frame Goto Github PK

View Code? Open in Web Editor NEW

This project forked from muffinmad/emacs-mini-frame

0.0 0.0 0.0 1.9 MB

Show minibuffer in child frame on read-from-minibuffer

License: GNU General Public License v3.0

Emacs Lisp 100.00%

emacs-mini-frame's Introduction

License GPL 3 MELPA

emacs-mini-frame

Place minibuffer at the top of the current frame on read-from-minibuffer.

While it's fine for me to have eldoc, flymake and other messages to appear at the bottom of the screen, editing minibuffer (find file, create VC branch, etc.) feels more comfortable in the upper area of the screen.

mini-frame-mode makes an advice around read-from-minibuffer function to create and show minibuffer-only child frame to accept input.

How it looks like

By default mini-frame is placed at the top of the current frame and occupies full width. Here is execute-extended-command (M-x) with icomplete-mode enabled:

Those who use vertical completion candidates list may configure mini-frame not to occupy full width:

(custom-set-variables
 '(mini-frame-show-parameters
   '((top . 10)
     (width . 0.7)
     (left . 0.5))))

Here is switch-to-buffer (C-x b) with ido-vertical-mode:

And execute-extended-command (M-x) with ivy-mode:

mini-frame-mode also creates a separate child frame to display completions list:

Mini-frame size

Users of Emacs 27 will benefits the most because of resize-mini-frames variable: mini-frame will be resized vertically to fit content.

Users of Emacs 26 will need to configure frame height explicitly, e.g.:

(custom-set-variables
 '(mini-frame-show-parameters
   '((top . 0)
     (width . 1.0)
     (left . 0.5)
     (height . 15))))

Gnome shell does not resize Emacs child frames

Until this issue will be solved, Gnome Shell users must also set mini-frame height.

Another option for Gnome Shell users is to use the following code in initialization file:

(setq x-gtk-resize-child-frames 'resize-mode)

Ignore commands

One can configure the list of commands that must not be shown in the child frame by customizing the mini-frame-ignore-commands. The eval-expression command is there by default because mini-frame have no modeline to display eldoc hints. And because there must be some place to turn mini-frame-mode off if something goes wrong (I hope not) :)

Installation and usage

mini-frame is available on MELPA.

Alternatively, you can download mini-frame.el and run:

M-x package-install-file RET <path-to-mini-frame-el> RET

M-x mini-frame-mode RET

emacs-mini-frame's People

Contributors

aaronjensen avatar conao3 avatar gcv avatar ia-androsov avatar jixiuf avatar kiennq avatar krychu avatar muffinmad avatar stebalien avatar syohex avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.