Skip to content

hron/too-wide-minibuffer-mode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

too-wide-minibuffer-mode - shrink minibuffer if the frame is too wide

GNU Emacs MELPA

too-wide-minibuffer-mode adjusts minibuffer size and position, so it is displayed under the selected window and occupied half of the frame. It is move convenient to focus if the frame is too wide.

Installation

The package is available from MELPA. After installation, activate the global minor mode with M-x too-wide-minibuffer-mode RET.

Configuration

(use-package too-wide-minibuffer-mode
  :init
  (too-wide-minibuffer-mode +1)

  :custom
  ;; The maximum allowed width for minibuffer window to display as is.
  (too-wide-minibuffer-max-width 200)
  ;; The mode is not compatible with `minibuffer-follows-selected-frame` set to `t`
  (minibuffer-follows-selected-frame nil))

Compatibility

This mode doesn’t work properly if `minibuffer-follows-selected-frame` is set to `t` and there are more than one frame. Please disable this setting in your configuration to avoid a warning message.

Alternatives

Apparently, this problem was solved one way or another many times in Emacs community. Here are the list of alternatives with a few words about the differences:

  • vertico-posframe works great, but only if you use vertico package and only to show completion candidates. It means it doesn’t control where Emacs shows `I-search:` prompt for example
  • emacs-mini-frame again, doesn’t control the echo area, also moves the minibuffer to a separate frame which creates problems with window managements
  • emacs-maple-minibuffer wraps around Emacs any command and should work with `isearch-forward` and `query-replace`, but in practice these commands don’t always use standard minibuffer interactions and at least for me neither isearch nor query-replace work reliably
  • ivy-posframe the same as vertico-posframe, great for completion candidates when you use `ivy`, but doesn’t affect isearch, echo area messages and etc

About

Shrink Emacs' minibuffer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published