Ivy - a generic completion frontend for Emacs, Swiper - isearch with an overview, and more. Oh, man!
flexible, simple tools for minibuffer completion in Emacs
This repository contains:
Ivy, a generic completion mechanism for Emacs.
Counsel, a collection of Ivy-enhanced versions of common Emacs commands.
Swiper, an Ivy-enhanced alternative to Isearch.
Ivy is a generic completion mechanism for Emacs. While it operates similarly to other completion schemes such as
icomplete-mode, Ivy aims to be more efficient, smaller, simpler, and smoother to use yet highly customizable.
To try Ivy, just call M-x
ivy-mode. This will enable generic Ivy completion, including specific completion for file and buffer names.
ivypackage from GNU ELPA or MELPA.
Users of Debian ≥10 (and derivatives such as Ubuntu ≥18.04) can install Ivy, Counsel, and Swiper with
sudo apt install elpa-counsel. To add Hydra support
sudo apt install elpa-ivy-hydra.
The manual is available as HTML.
ivyfrom GNU ELPA or MELPA also installs the manual under the
The source file for the Info page is here.
Ivy and Swiper wiki is here: the wiki.
(ivy-mode) (setq ivy-use-virtual-buffers t) (setq enable-recursive-minibuffers t) ;; enable this if you want `swiper' to use it ;; (setq search-default-mode #'char-fold-to-regexp) (global-set-key "\C-s" 'swiper) (global-set-key (kbd "C-c C-r") 'ivy-resume) (global-set-key (kbd "") 'ivy-resume) (global-set-key (kbd "M-x") 'counsel-M-x) (global-set-key (kbd "C-x C-f") 'counsel-find-file) (global-set-key (kbd " f") 'counsel-describe-function) (global-set-key (kbd " v") 'counsel-describe-variable) (global-set-key (kbd " o") 'counsel-describe-symbol) (global-set-key (kbd " l") 'counsel-find-library) (global-set-key (kbd " i") 'counsel-info-lookup-symbol) (global-set-key (kbd " u") 'counsel-unicode-char) (global-set-key (kbd "C-c g") 'counsel-git) (global-set-key (kbd "C-c j") 'counsel-git-grep) (global-set-key (kbd "C-c k") 'counsel-ag) (global-set-key (kbd "C-x l") 'counsel-locate) (global-set-key (kbd "C-S-o") 'counsel-rhythmbox) (define-key minibuffer-local-map (kbd "C-r") 'counsel-minibuffer-history)
Note: parts of this config can be replaced by using
ivy-modeensures that any Emacs command using
completing-read-functionuses ivy for completion.
Counsel takes this further, providing versions of common Emacs commands that are customised to make the best use of Ivy. For example,
counsel-find-filehas some additional keybindings. Pressing DEL will move you to the parent directory.
counsel-moderemaps built-in Emacs functions that have counsel replacements:
| Emacs command | Counsel equivalent | |----------------------------|------------------------------| |
Swiper is an alternative to isearch that uses Ivy to show an overview of all matches.
A Helm version of Swiper is also available: swiper-helm.
There's also a ten minute video demo.
Q: How do I enter an input that matches one of the candidates instead of this candidate? Example: create a file
barwhen a file
barricadeexists in the current directory.
A: Press C-M-j. Alternatively, you can make the prompt line selectable with
(setq ivy-use-selectable-prompt t).
Please see the guidelines for reporting issues and opening pull requests.