Ivy 0.10.0 is out

综合技术 2017-12-01 阅读原文

Intro

Ivy
is a completion method that's similar to Ido
, but with emphasis on simplicity and customizability.

Overview

The current release constitutes of 280 commits and 8 months of progress since 0.9.0
. Many issues ranging from #952
to #1336
were fixed. The number of people who contributed code as grown to 91
; 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.

Selectable prompt

Off by default. You can turn it on like so:

(setq ivy-use-selectable-prompt t)

After this, your current input becomes selectable as a candidate. Press C-p
when you're on the first candidate to select your input instead.

This solves the long standing issue of e.g. creating a file or a directory foo
when a file foobar
already exists. Previously, the only solution was to use C-M-j
. It's still available, but now you can also select your input with C-p
and press RET
.

New global actions for ivy

ivy-set-actions
was used to enable the following bindings:

  • Press M-o w
    to copy the current candidate to the kill ring.
  • Press M-o i
    to insert the current candidate into the buffer.

These bindings are valid for any completion session by default.

Use C-d
in ivy-occur buffers

Here's an example use-case: search your source code for a variable name with e.g. counsel-rg
and call ivy-occur
( C-c C-o
). Suppose you get 10 results, only 4 of which are interesting. You can now delete the uninteresting ones with C-d
. Then maybe check off the others with C-d
as well as you complete them one by one. A sort of a TODO list.

Similarly, if you want to go over variables to customize, you can call counsel-describe-variable
with input ^counsel-[^-]
and then check off the ones you have already examined with C-d
.

Defcustoms to play with

Here's the list of new defcustom
or defvar
that might be interesting to review:

  • counsel-async-filter-update-time
  • counsel-async-ignore-re
  • counsel-describe-function-function
  • counsel-describe-function-preselect
  • counsel-find-file-ignore-regexp
  • counsel-fzf-dir-function
  • counsel-git-grep-skip-counting-lines
  • counsel-git-log-split-string-re
  • counsel-url-expansions
  • ivy-auto-select-single-candidate
  • ivy-magic-slash-non-match-action
  • ivy--preferred-re-builders
  • ivy-truncate-lines

New Commands

14 new commands were added by me and many contributors. Here's the list:

  • counsel-ack
    - completion for ack
  • counsel-apropos
    - completion for apropos
  • counsel-file-register
    - completion for file registers
  • counsel-fzf
    - completion for fzf
  • counsel-git-change-worktree
    - completion for git-worktree
  • counsel-git-checkout
    - completion for git-checkout
  • counsel-minibuffer-history
    - generalization of counsel-expression-history
    and counsel-shell-command-history
  • counsel-org-capture
    - completion for org-capture
  • counsel-org-file
    - browse all attachments for the current Org file
  • counsel-org-goto
    - completion for Org headings
  • counsel-org-goto-all
    - completion for Org headings in all open buffers
  • counsel-switch-to-shell-buffer
    - switch to a shell buffer, or create one
  • ivy-occur-delete-candidate
    - delete current candidate in ivy-occur-mode
  • ivy-switch-view
    - select awindow configuration, decoupled from ivy-switch-buffer

My personal favorites are counsel-fzf
and counsel-org-file
.

Outro

Again, thanks to all the contributors. Happy hacking!

P.S. Please consider joining my 74 patrons
to give me the opportunity to work on Free Software a lot more. We are currently at 30% of the goal.

责编内容by:(or emacs 【阅读原文】。感谢您的支持!

您可能感兴趣的

A quick intro to Angular Ivy Angular recently announced a new render engine called Ivy . Ivy i...
Angular Ivy change detection execution: are you pr... Angular Ivy change detection execution: are you prepared? ...
Bryan Murdock: Fixing xref-find-references I was annoyed that xref-find-references searched more than the files in the TAG...
What do you know about Ivy engine in Angular? Originally I shared this post to Syndicode blog . While I was concen...