Ivy 0.9.0 is out09 Apr 2017
Ivy is a completion method that's
Ido, but with emphasis on simplicity and customizability.
The current release constitutes of
339 commits and almost a full
year of progress since
0.8.0. Many issues ranging
to #946 were fixed.
The number of people who contributed code as grown
Details on changes
Changelog.org has been a part of the repository since
can get the details of the current and past changes:
Many improvements are incremental and don't require any extra code to enable. I'll go over a few selected features that require a bit of information to make a good use of them.
A better action choice interface
ivy completions, pressing M-o allows to execute
one of the custom actions for the current command. Now you have an
option to use hydra for selecting
an action. Use this code to turn on the feature:
One big advantage of the new interface is that you can peak at the action list with M-o without dismissing the candidate list. Press M-o again to go back to candidate selection without selecting an action.
Here's some code from my config that ensures that I always have some extra actions to choose from:
(defun ora-insert (x) (insert (if (stringp x) x (car x)))) (defun ora-kill-new (x) (kill-new (if (stringp x) x (car x)))) (ivy-set-actions t '(("i" ora-insert "insert") ("w" ora-kill-new "copy")))
counsel-rg joins the group of grepping commands in
wraps around the newly popular and very
fast ripgrep shell tool.
A nice improvement to the grepping commands is the ability to specify
extra flags when you press C-u (
command. See this gif
for an example of excluding
*.el from the files searched by
Press M-o b to change the current directory to one of the virtual buffers' directories. You continue to select a file from that directory.
Press M-o r to find the current file as root.
You can now customize
#652 for using this to
counsel-git-log work on Windows.
counsel-info-lookup-symbolnow substitutes the built in
- Pressing C-r while in the minibuffer of
shell-commandnow gives you completion of your previous history.
Use the new
counsel-yank-pop-separator variable to make
There was breaking change for alist type collections some months
ago. Right now the action functions receive an
item from the
collection, instead of
(cdr item) like before. If anything breaks,
the easy fix is to add an extra
cdr to the action function.
Unique index for alist completion was added. The uniqueness assumption
is that the completion system is passed a list of unique strings, of
which one (or more) are selected. Unlike plain string completion,
alists may require violating the uniqueness assumption: there may be
two elements with the same
car but different
cdr. Example: C
function declaration and definition for tag completion. Until now,
whenever two equal strings were sent to
ivy-read, only the first one
could be selected. Now, each alist car gets an integer index assigned
to it as a text property
'idx. So it's possible to differentiate two
alist items with the same key.
Action functions don't require using
with-ivy-window anymore. This
allows for a lot of simplification, e.g. use
insert instead of
(lambda (x) (with-ivy-window (insert x))).
You can now customize faces in
ivy-switch-buffer by the mode of each buffer.
Here's a snippet from my config:
(setq ivy-switch-buffer-faces-alist '((emacs-lisp-mode . swiper-match-face-1) (dired-mode . ivy-subdir) (org-mode . org-level-4)))
Looks neat, I think:
swiper-include-line-number-in-search if you'd like to
match line numbers while using
Offers completion for
bookmark-jump. Press M-o d to
delete a bookmark and M-o e to edit it.
A custom option
counsel-bookmark-avoid-dired, which is off by
default, allows to continue completion for bookmarked
directories. Turn it on with:
(setq counsel-bookmark-avoid-dired t)
and when you choose a bookmarked directory, the choice will be
counsel-find-file instead of opening a
counsel-colors-emacs and counsel-colors-web
Completion for colors by name:
- the default action inserts the color name.
- M-o h inserts the color hex name.
- M-o N copies the color name to the kill ring.
- M-o H copies the color hex name to the kill ring.
The colors are displayed in the minibuffer, it looks really cool:
You also get 108 shades of grey to choose from, for some reason.
Completion for faces by name:
Shows the history of the Emacs commands executed and lets you select and eval one again. See #826 for a nice screenshot.
company's candidates and inserts the result into the buffer.
counsel-dired-jump and counsel-file-jump
Jump to a directory or a file in the current directory.
counsel-dpkg and counsel-rpm
Wrap around the popular system package managers.
Install or uninstall Emacs packages with completion.
Navigate the current buffer's mark ring.
Navigate the current buffer's tags.
Navigate the current buffer's outlines.
Completion for the last hydra's heads.
Completion for headlines of files in your
Again, thanks to all the contributors. Happy hacking!