Skip to content

Latest commit

 

History

History
48 lines (30 loc) · 2.56 KB

README.org

File metadata and controls

48 lines (30 loc) · 2.56 KB

Hippie Completing Read

I use completing-read in Emacs. I even use it in lieu of popular completion packages like company and such, for completion-in-region. The one final thorn in my side was using hippie-expand, which completes some things better, or at least … different-er, than regular completion-in-region commands. So I went searching for how to combine both things.

Deep in the back waters of EmacsWiki, I found it: code for an =ido= interface to =completing-read=. It was easy to adapt to completing-read code, so I did, and here’s the package.

Install

You should honestly know how to install packages in Emacs, but you can use straight.el:

(straight-use-package
 '(hippie-completing-read
   :host nil
   :repo "https://codeberg.org/acdw/hippie-completing-read.el"))

and you should be good to go.

Using

hippie-completing-read exposes one function, aptly called hippie-completing- read. I bind it thusly:

(global-set-key (kbd "M-/") #'hippie-completing-read)

Customizing

There are a number of customization options available for hippie-completing- read, of which this is a not-definitely up-to-date list. For the definitive list, see the Easy Customization group for this package.

hippie-completing-read-prompt
The prompt to display with hippie-completing-read-expand-with. Default: Hippie:.
hippie-completing-read-function
Function to use to display and select from hippie-expand selections. Should be compatible with completing-read. Default: completing-read.
hippie-completing-read-function-parameters
Further parameters to pass to hippie-completing-read-function. By default, add he-search-string (the thing we’re completing) as initial input. This variable is risky, since its values are evaluated when passed to hippie-completing-read.
hippie-completing-read-threshold
Number of expansion candidates needed before using completing-read. The more traditional “cycling” behavior for hippie-complete will be used so long as there are not more completion candidates than in this number.

Contributing

IDK, open an issue, or whatever.

License

Copyright (C) 2021–2022 Case Duckworth <acdw@acdw.net>

Usage of the works is permitted provided that this instrument is retained with the works, so that any entity that uses the works is notified of this instrument.

DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.