Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oantolin/restricto
Restrict to current completion candidates
https://github.com/oantolin/restricto
Last synced: 30 days ago
JSON representation
Restrict to current completion candidates
- Host: GitHub
- URL: https://github.com/oantolin/restricto
- Owner: oantolin
- License: gpl-3.0
- Created: 2020-05-04T14:33:01.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-05-18T00:58:03.000Z (over 4 years ago)
- Last Synced: 2024-08-07T18:31:14.660Z (5 months ago)
- Language: Emacs Lisp
- Size: 23.4 KB
- Stars: 14
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
* Overview
This package provides a command to restrict minibuffer completion to
the current completion candidates. This is something several
completion frameworks provide: Icicles, Ido, Ivy, Helm, Selectrum all
have it. It enables fast out-of-order matching. This package is
completion framework agnostic and can be used, for example, with the
default minibuffer tab completion, or with Icomplete, which don't have
such a feature.To use, simply bind =restricto-narrow= in
=minibuffer-local-completion-map=. If you want to be able undo
restriction, enable =restricto-mode= and also bind =restricto-widen=.The =restricto-mode= global minor mode will also detect if you use
=minibuffer-electric-default-mode= and in that case ensure the default
prompt does not reappear upon restricting.Sample configuration (put =restricto.el= somewhere in your =load-path=):
#+begin_src emacs-lisp
(require 'restricto)
(restricto-mode)
(define-key minibuffer-local-completion-map (kbd "C-SPC") #'restricto-narrow)
(define-key minibuffer-local-completion-map (kbd "M-SPC") #'restricto-widen)
#+end_src