Ivy 0.13.0 is out
16 Oct 2019Intro
Ivy is a completion method that's
similar to Ido
, but with emphasis on simplicity and customizability.
Overview
The current release constitutes of 183 commits and 3 months of
progress since 0.12.0
. Many issues ranging from
#2153 to
#2278 were fixed.
The number of people who contributed code as grown to form 148 to
160. Thanks,
everyone!
Details on changes
Changelog.org
has been a part of the repository since 0.6.0
, you
can get the details of the current and past changes:
Highlights
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.
New bindings
counsel-find-file
- ~~ to move to the local home directory from remote or
/sudo::
. - / RET ~ achieves the same thing, but is longer.
- M-o R calls
find-file-read-only
.
- ~~ to move to the local home directory from remote or
counsel-git-grep
- C-x C-d to switch the current directory.
swiper-isearch
- M-o w to copy the current line and go back to where you started.
New features
counsel-package
The idea of counsel-package
is to install and remove packages with a single binding:
(global-set-key (kbd "C-c P") 'counsel-package)
But if the package contents weren't up to date, a separate M-x package-refresh-contents
had to be triggered, which was an annoying overhead. Now counsel-package
will look at the time
stamps of the appropriate archive-contents
files, and call package-refresh-contents
if the
timestamp is outdated by more than 4 hours.
counsel-M-x
Some commands are intended to be called only via their key binding. Make them disappear
from counsel-M-x
like this:
(put 'counsel-find-symbol 'no-counsel-M-x t)
counsel-rg
The default setting of ivy-case-fold-search-default
is 'auto
, which means:
- the input "emacs" matches "emacs", "EMACS", and "Emacs"
- the input "Emacs" matches only "Emacs"
This now also applies to counsel-rg
: Ivy will pass the -i
flag to ripgrep
appropriately, based
on ivy-case-fold-search-default
. You should remove the -S
flag from counsel-rg-base-command
if
you customized it.
ivy-update-candidates
This is a new API for asynchronous calls. To use it, pass to ivy-read
: :dynamic-collection t
,
and a collection function that takes a user input string, starts some asynchronous process based on
that input, and returns 0
. The 0
return result tells Ivy that no candidates were returned;
instead, ivy-update-candidates
is used in the async callback.
See counsel-google
for a reference implementation.
ivy-use-virtual-buffers
You can now choose between: recent files, or bookmarks, or both, or none. Don't forget that
counsel-set-variable
makes it very easy to set customization options.
New Commands
I have put these separately so they don't get lost in the crowd. Be sure to try them out.
counsel-buffer-or-recentf
- list buffers visiting files (highlighted) then therecentf
file list.counsel-fonts
- show a list of all supported font families for a particular frame.counsel-google
- asynchronously query the Google predictive search API.counsel-major
- switchmajor-mode
.counsel-slime-repl-history
- browse SLIME REPL history.
Outro
Again, thanks to all the contributors. Happy hacking!
PS. Thanks to everyone who supports me on Liberapay and Patreon!
I am now also on Github sponsors, which is an interesting new effort by Github. The cool thing is that's more integrated with Github, there are less transaction fees, and Github matches every donation for up to $5000 for a whole year. Please consider joining there, since every $1 per month that you donate is doubled by Github.