Ivy CHANGELOG
Table of Contents
- 0.6.0
- Fixes
swiper-avy
should use only the current window- fix wrap-around for
ivy-next-line
swiper-avy
should do nothing for empty inputivy-alt-done
should require TRAMP if necessaryswiper-query-replace
shouldn't miss the first occurrenceswiper
should not deactivate markivy-mode
should not switch to TRAMP for certain inputcounsel-find-file
should work better with TRAMPcounsel-find-file
supports Windows drive letterscounsel-file-file
should work better with files that contain "~"counsel-M-x
should respectivy-format-function
counsel-git-grep
should position better on exitivy-mode
should re-scale text to minibuffer heightcounsel-unicode-char
should use action-style callivy-read
should allow % in prompt stringivy-call
should execute in proper window
- New Features
- New Commands
- Fixes
- 0.7.0
- Fixes
- Fix :dynamic-collection not being sorted
- When :initial-input contains a plus, escape it
- Set line-spacing to 0 in the minibuffer
- Enlarge the minibuffer window if the candidate list doesn't fit
- Fix minibuffer collapsing to one line
- Use minibuffer-allow-text-properties
- Improve C-g out of a long-running async process
- Don't regexp-quote :preselect
- Fix ivy-partial for fuzzy completion
- ivy-resume should pass :caller
- Fix the regression in perfect match logic
- Fix pasting file paths on Windows
- C-j should no stop completion for a pasted file path
- C-M-j should use
ivy--directory
- Use a specific blend method for dark themes
- Fix one-off bug in
ivy-scroll-up-command
andivy-scroll-down-command
- M-o shouldn't set the action permanently
- Fix swiper preselect issue with similar or identical lines
- Make ivy-completing-read handle history as cons
- Perform string-match in the original buffer
- New Features
- New Commands
- Fixes
- 0.8.0
- Package rename
- Documentation
- Fixes
ivy-read
ivy-occur
ivy--resize-minibuffer-to-fit
ivy-completing-read
ivy--regex-plus
ivy--get-window
ivy--recompute-index
ivy-reverse-i-search
ivy--reset-state
ivy-completion-in-region
ivy-read-action
ivy-count-format
ivy-switch-buffer
ivy-next-history-element
ivy-occur-press
ivy-resume
ivy-avy
ivy-dispatching-done
swiper
swiper-font-lock-ensure
swiper--multi-candidates
counsel--async-sentinel
counsel-git
counsel-recoll
- compilation warnings
- New Features
ivy-read
ivy-mode
ivy-set-occur
ivy-occur-mode
ivy-re-builders-alist
ivy-set-actions
ivy-faces
ivy-flx-limit
ivy-inhibit-action
ivy-do-completion-in-region
ivy-fixed-height-minibuffer
ivy-set-display-transformer
ivy-ignore-buffers
ivy-add-newline-after-prompt
ivy-switch-buffer
ivy-use-ignore-default
swiper
swiper-font-lock-exclude
swiper-all
counsel-mode
counsel-find-file
counsel-git-grep
counsel-locate
counsel-yank-pop
counsel-unicode-char
counsel-rhythmbox
counsel-ag
counsel-async-split-string-re
counsel--async-cmd
counsel-prompt-function
counsel-grep
counsel-M-x
- New Commands
- 0.9.0
- Fixes
colir-parse-color
counsel--gg-sentinel
counsel-ace-link
counsel-ag
counsel-find-file
counsel-git
counsel-grep
counsel-grep-or-swiper
counsel-imenu
counsel-info-lookup-symbol
counsel-linux-app
counsel-load-theme
counsel-locate
counsel-M-x
counsel-org-tag-action
counsel-recoll
counsel-rhythmbox
counsel-yank-pop
- doc
ivy--filter
ivy--flx-sort
ivy--format-minibuffer-line
ivy--minibuffer-setup
ivy--occur-insert-lines
ivy--regex-ignore-order
ivy--reset-state
ivy--virtual-buffers
ivy-call
ivy-completion-in-region
ivy-completion-in-region-action
ivy-fixed-height-minibuffer
ivy-help-file
ivy-hydra
is now a separate package on MELPAivy-immediate-done
ivy-minibuffer-map
ivy-occur-press
ivy-partial
ivy-read
ivy-remote
ivy-resume
ivy-sort-functions-alist
ivy-switch-buffer
ivy-switch-buffer-other-window
- Recursive minibuffers with two emacsclients
- shrink minibuffer after reading actions
swiper
swiper-avy
swiper-font-lock-exclude
swiper-multi
- New Features
- New Commands
counsel-bookmark
counsel-colors-emacs
counsel-colors-web
counsel-command-history
counsel-company
counsel-describe-face
counsel-dired-jump
counsel-dpkg
counsel-faces
counsel-file-jump
counsel-find-library
counsel-hydra-heads
counsel-irony
counsel-mark-ring
counsel-org-agenda-headlines
counsel-outline
counsel-package
counsel-recentf
counsel-rg
counsel-rpm
counsel-semantic
counsel-set-variable
counsel-shell-command-history
ivy-push-view
ivy-rotate-sort
- Fixes
- 0.10.0
- Fixes
- counsel-ag
- counsel-ag-occur
- counsel-company
- counsel-descbinds
- counsel-dired-jump
- counsel-find-file
- counsel-find-file-occur
- counsel-git-grep
- counsel-git-grep-occur
- counsel-git-grep-recenter
- counsel-git-grep-transformer
- counsel-git-log
- counsel-git-occur
- counsel-grep-base-command
- counsel-imenu
- counsel-irony
- counsel-locate-action-extern
- counsel-M-x
- counsel-package
- counsel-set-variable
- counsel-shell-history
- counsel-unquote-regex-parens
- ivy
- ivy-add-actions
- ivy-avy
- ivy-completing-read-handlers-alist
- ivy-completion-in-region
- ivy-display-function-overlay
- ivy-ffap-url-functions
- ivy-format-function-arrow
- ivy-initial-inputs-alist
- ivy-occur
- ivy-partial
- ivy-previous-line-or-history
- ivy-re-builders-alist
- ivy-with-r
- swiper
- swiper–init
- swiper-all-buffer-p
- swiper-font-lock-exclude
- New Features
- counsel
- counsel-async-filter-update-time
- counsel-async-ignore-re
- counsel-describe-function
- counsel-describe-function-function
- counsel-describe-function-preselect
- counsel-describe-variable
- counsel-find-file-ignore-regexp
- counsel-fzf-dir-function
- counsel-git
- counsel-git-grep-skip-counting-lines
- counsel-git-log-split-string-re
- counsel-grep-or-swiper
- counsel-imenu-map
- counsel-linux-app
- counsel-mark-ring
- counsel-mode-map
- counsel-rg
- counsel-unicode-char
- counsel-up-directory
- counsel-url-expand
- counsel-yank-pop
- ivy
- ivy-auto-select-single-candidate
- ivy-backward-delete-char
- ivy-completion-in-region
- ivy-dispatching-done-hydra
- ivy-magic-slash-non-match-action
- ivy-occur
- ivy-occur-mode-map
- ivy-read
- ivy-read-action
- ivy-rotate-preferred-builders
- ivy-switch-buffer
- ivy-truncate-lines
- ivy-use-selectable-prompt
- swiper-query-replace
- New Commands
- Fixes
- 0.11.0
- Fixes
- colir-blend-face-foreground
- counsel
- counsel-ag
- counsel-bookmark
- counsel-colors-list
- counsel-company
- counsel-describe-face
- counsel-describe-function
- counsel-find-file
- counsel-find-library
- counsel-fzf
- counsel-git-grep
- counsel-grep
- counsel-list-processes
- counsel-locate
- counsel-locate-action-extern
- counsel-minibuffer-history
- counsel-M-x
- counsel-org-agenda-headlines
- counsel-org-capture
- counsel-org-files
- counsel-org-goto
- counsel-org-tag
- counsel-outline
- counsel-rg
- counsel-switch-to-shell-buffer
- counsel-unicode-char
- counsel-yank-pop
- docs
- ivy
- ivy-completing-read
- ivy-completion-in-region
- ivy–kill-buffer-action
- ivy–occur-insert-lines
- ivy-occur-press
- ivy-overlay-show-after
- ivy-partial
- ivy–regex-fuzzy
- ivy–regex-ignore-order
- ivy–regex-plus
- ivy-rotate-preferred-builders
- ivy-string<
- ivy-thing-at-point
- swiper
- swiper-avy
- swiper-multi
- New Features
- counsel
- counsel-bookmark
- counsel-dired-jump
- counsel-find-file-jump
- counsel-fzf
- counsel-git-grep
- counsel-grep
- counsel-imenu
- counsel-linux-app
- counsel-locate
- counsel-mode
- counsel-M-x
- counsel-rg
- counsel-rhythmbox
- counsel-semantic
- counsel-set-variable
- counsel-yank-pop
- ivy
- ivy-occur-grep-mode
- ivy-occur-next-line
- ivy-preferred-re-builders
- ivy-push-view
- ivy-switch-buffer
- swiper
- swiper-all
- swiper-font-lock-exclude
- swiper-occur
- New Commands
- Fixes
- 0.12.0
- Fixes
- counsel-ag
- counsel-company
- counsel-dired-jump
- counsel-file-jump
- counsel-find-file
- counsel-git-checkout
- counsel-git-log
- counsel-locate
- counsel-org-file
- counsel-org-goto-all
- counsel-org-tag-agenda
- counsel-package
- counsel-recentf
- counsel-rhythmbox
- counsel-unicode-char
- documentation
- ivy-avy
- ivy-completion-in-region
- ivy-display-function-overlay
- ivy-help
- ivy-immediate-done
- ivy-insert-current
- ivy-next-history-element
- ivy-occur
- ivy-occur-press
- ivy-partial
- ivy-previous-line-or-history
- ivy-read
- ivy-reverse-i-search
- ivy–sort
- ivy-switch-buffer
- ivy-thing-at-point
- ivy-use-selectable-prompt
- swiper
- swiper-avy
- swiper-font-lock-exclude-p
- swiper-multi
- swiper-query-replace
- New Features
- counsel-descbinds
- counsel-file-jump
- counsel-find-file
- counsel-git-grep
- counsel-git-log
- counsel-grep
- counsel-grep-use-swiper-p
- counsel-locate
- counsel-mark-ring
- counsel-M-x
- counsel-rg
- counsel-set-variable
- ivy-avy
- ivy-dispatching-done-hydra
- ivy-read
- ivy–regex
- ivy-reverse-i-search
- ivy-sort-matches-functions-alist
- ivy-switch-buffer
- swiper
- swiper-query-replace
- New Commands
- counsel-compile
- counsel-dired
- counsel-minor
- counsel-register
- counsel-switch-buffer
- counsel-switch-buffer-other-window
- swiper-all-thing-at-point
- swiper-isearch
- swiper-isearch-thing-at-point
- swiper-isearch-toggle
- swiper-thing-at-point
- swiper-backward
- counsel-grep-or-swiper-backward
- swiper-isearch-backward
- Fixes
- 0.13.0
- Fixes
- counsel–async-last-command
- counsel–async-last-error-string
- counsel-cd
- counsel-compile
- counsel-compile-env-pattern
- counsel-file-jump
- counsel-git-grep-action
- counsel-imenu
- counsel-locate-cmd-es
- counsel-mark-ring
- counsel-M-x
- counsel–py-action
- counsel-rg-base-command
- Documentation
- hydra-ivy
- ivy
- ivy-completion-in-region
- ivy–directory-done
- ivy-dispatching-done-hydra
- ivy–done
- ivy-immediate-done
- ivy–input
- ivy–magic-file-slash
- ivy-occur
- ivy-occur-revert-buffer
- ivy-overlay-show-after
- ivy-partial
- ivy-read
- ivy-resume
- ivy-yank-word
- swiper
- swiper-isearch
- swiper-isearch-action
- swiper-occur
- swiper-query-replace
- swiper-recenter-top-bottom
- swiper-thing-at-point
- Tests
- New Features
- counsel-dired
- counsel-dired-jump-args
- counsel-file-jump-args
- counsel-find-file
- counsel-find-file-mkdir-action
- counsel-git-grep
- counsel-M-x
- counsel-package
- counsel-rg
- counsel-switch-buffer
- ivy-configure
- ivy-ffap-url-functions
- ivy-partial
- ivy-partial-or-done
- ivy-pre-prompt-function
- ivy-read
- ivy-read-action-function
- ivy-restrict-to-matches
- ivy-update-fns-alist
- ivy-use-virtual-buffers
- swiper-goto-start-of-match
- swiper-isearch
- New Commands
- Fixes
0.6.0
Fixes
swiper-avy
should use only the current window
Not all windows. See #117.
fix wrap-around for ivy-next-line
See #118.
swiper-avy
should do nothing for empty input
See #50.
ivy-alt-done
should require TRAMP if necessary
See #145.
swiper-query-replace
shouldn't miss the first occurrence
See #144.
swiper
should not deactivate mark
ivy-mode
should not switch to TRAMP for certain input
See #145.
counsel-find-file
should work better with TRAMP
"/ssh:foo" should not be cut off See #145.
counsel-find-file
supports Windows drive letters
See #155.
counsel-file-file
should work better with files that contain "~"
See #157.
counsel-M-x
should respect ivy-format-function
See #150.
counsel-git-grep
should position better on exit
See #153.
ivy-mode
should re-scale text to minibuffer height
See #151.
counsel-unicode-char
should use action-style call
See #160.
ivy-read
should allow % in prompt string
See #171.
ivy-call
should execute in proper window
See #176.
New Features
ivy-mode
Open an Info file on the file system
When in Info-mode
, press g and select either "(./)" or "(../)" to
switch to file name completion. That file will be opened with Info.
Account for minibuffer-depth-indication-mode
If you have minibuffer-depth-indication-mode
on, the minibuffer
prompt will indicate the current depth.
See #134.
Add fuzzy matching function
case-fold-search
optimization
Bind case-fold-search to t when the input is all lower-case:
- input "the" matches both "the" and "The".
- input "The" matches only "The".
See #166.
Allow to see the candidate index a la anzu
via ivy-count-format
Allow to add additional exit points for any command
Example for ivy-switch-to-buffer
:
(ivy-set-actions 'ivy-switch-buffer '(("k" (lambda (x) (kill-buffer x) (ivy--reset-state ivy-last)) "kill") ("j" ivy--switch-buffer-other-window-action "other")))
After this:
- use M-o k to kill a buffer
- use M-o j to switch to a buffer in other window
You can always use M-o o to access the default action. When there is only one action, M-o does the same as C-m.
See #164.
counsel-describe-function
and counsel-decribe-variable
Add a binding to look up the symbol in info
Press C-, to look up the symbol in info, instead of the default describe action. See #121.
Handle symbol-at-point better in non-Elisp buffers
See #126.
ivy-switch-buffer
New face ivy-virtual
See #129.
Deal better with invisible buffers
See #135.
Add custom keymap
Add extra actions
Add a kill-buffer
action, and switch-to-buffer-other-window
action.
counsel-git-grep
Add Async
Make it fully async: the process git grep
will be killed and
restarted on new input. This results in almost no keyboard delay.
Own history variable
swiper
Own history variable
Having own history variable allows to get more use of M-p, M-n and C-r.
counsel-el
Switch to action-style call
This allows to make use of C-M-n and C-M-p.
counsel-locate
Add Async
Add extra actions
In addition to the default action of opening a file add:
xdg-open
actiondired
action
Press M-o or C-o to access these actions.
Add own history
API
Add :matcher
A matcher is a function that accepts a regexp and a list of candidates and returns the filtered list of candidates.
The default matcher is basically cl-remove-if-not
+ string-match
.
If you'd like to customize this, pass your own matcher.
See counsel-git-grep-matcher
for an example.
Allow to customize the initial input for all commands
Customize ivy-initial-inputs-alist
for this.
See #140.
ivy-sort-functions-alist
should also examine this-command
:dynamic-collection is now a boolean
Pass the collection function as the second var instead.
New Commands
ivy-call
Execute the current action for the current candidate without exiting the minibuffer. Bound to C-M-m or M-RET or C-o g.
counsel-find-file
Forward to find-file
with Ivy completion.
ivy-next-line-and-call
as well as ivy-resume
should work for this command.
The variable counsel-find-file-ignore-regexp
allows to ignore
certain files, like dot files. Input a leading dot to see all files.
The variable counsel-find-file-at-point
allows to automatically use
ffap
. You also can do it manually with M-n when the point is on a file name.
The variable counsel-find-file-map
allows to customize the
minibuffer key bindings for this command.
Recommended binding:
(global-set-key (kbd "C-x C-f") 'counsel-find-file)
You can peek at files with C-M-n and C-M-p.
See #152 about M-n, M-p and M-i switching directories when necessary.
ivy-recentf
Find a file on recentf-list
.
Note that if your set ivy-use-virtual-buffers
, recentf-list
is
merged into candidates list for ivy-switch-buffer
. But if you want
it separately, you can use this command.
See #124.
ivy-yank-word
Add word at point to minibuffer input.
This is similar to what C-w does for isearch
. However it's bound
to M-j instead of C-w, since C-w is bound to kill-region
- a
useful command.
See #125.
counsel-M-x
Forward to execute-extended-command
with Ivy completion.
The candidate list will also display the key binding for each bound command.
This command will piggyback on smex
for sorting, if smex
is installed.
Use counsel-M-x-initial-input
to customize the initial input for
this command. By default, it's "^" - the regex character that
indicates beginning of string. This results in much faster matching,
since you usually type the command name from the start.
hydra-ivy
Press C-o to toggle the Hydra for Ivy. It gives access to shorter bindings and many customizable options.
Use C-o > to grow the minibuffer. Use C-o < to shrink the minibuffer.
See #151.
ivy-toggle-calling
Toggle executing the current action each time a new candidate is selected.
This command is bound to C-o c.
To explain how this is useful: C-M-m C-M-f C-M-f C-M-f is equivalent to C-o cjjj.
ivy-insert-current
Inserts the current candidate into the minibuffer.
Press M-i if you want something close to the current candidate. You can follow up with an edit and select.
I find this very useful when creating new files with a similar name to the existing file: C-x C-f M-i + a bit of editing is very fast.
See #141.
counsel-load-theme
Forward to load-theme
with Ivy completion. Allows to rapidly try themes (e.g. with C-M-n).
ivy-reverse-i-search
Allow to recursively match history with C-r.
I like this command from bash shell. The usual way to search through
history is with M-p and M-n. Using ivy-reverse-i-search
will
open a recursive completion session with the current history as the
candidates.
counsel-rhythmbox
ivy-dispatching-done
Select an action for the current candidate and execute it. Bound to M-o.
Some commands that support M-o:
counsel-rhythmbox
counsel-describe-function
counsel-describe-variable
ivy-switch-buffer
counsel-locate
counsel-org-tag
counsel-org-tag-agenda
Forward to org-agenda-set-tags
with Ivy completion.
See #177.
counsel-ag
Interactively ag
using Ivy completion.
counsel-recoll
Use recoll
with Ivy completion.
See Using Recoll desktop search database with Emacs.
Install recoll with sudo apt-get install recoll
.
swiper-from-isearch
Start swiper
from the current isearch
input.
ivy-immediate-done
Use this command to exit the minibuffer choosing not the current candidate, but the current text. Bound to C-M-j or C-u C-j.
See #183.
0.7.0
Fixes
Fix :dynamic-collection not being sorted
When :initial-input contains a plus, escape it
See #195.
Set line-spacing to 0 in the minibuffer
See #198.
Use minibuffer-allow-text-properties
Allows ivy-read
to return a propertized string.
Improve C-g out of a long-running async process
Use counsel-delete-process
as :unwind
.
Don't regexp-quote :preselect
See #245.
Fix ivy-partial for fuzzy completion
See #266.
ivy-resume should pass :caller
See #245.
Fix the regression in perfect match logic
See #270.
Fix pasting file paths on Windows
C-j should no stop completion for a pasted file path
C-M-j should use ivy--directory
When completing file names, expand the file name properly. See #275.
Use a specific blend method for dark themes
See #278.
Fix one-off bug in ivy-scroll-up-command
and ivy-scroll-down-command
M-o shouldn't set the action permanently
So now it's possible to e.g. counsel-describe-function
-> M-o d ->
ivy-resume
-> M-o o -> ivy-resume
-> M-o i.
Fix swiper preselect issue with similar or identical lines
See #290.
Make ivy-completing-read handle history as cons
See #295.
Perform string-match in the original buffer
The syntax for whitespace, separators etc. is different for modes. See #298.
New Features
swiper
Make line numbers into display properties
Each candidate is now a single space plus the original string. The display property of the single space holds the line number. This means that it's no longer possible to match line numbers in queries, which is a good thing if you're searching for numbers.
Extend swiper-font-lock-ensure
Add mu4e-view-mode
, mu4e-headers-mode
, help-mode
,
elfeed-show-mode
, emms-stream-mode
, debbugs-gnu-mode
,
occur-mode
, occur-edit-mode
, bongo-mode
, eww-mode
, vc-dir-mode
.
Add support for evil-jumper/backward
See #268.
Make compatible with visual-line-mode
swiper
will split the lines when visual-line-mode
is on. This is
convenient for small buffers. For large buffers, it can be very slow,
since visual-line-mode
is slow.
See #227.
Add swiper-toggle-face-matching
Bound to C-c C-f.
At each start of swiper
, the face at point will be stored.
Use this command to toggle matching only the candidates with that face.
See #288.
push-mark
only if exited the minibuffer
C-M-n and C-M-p will no longer push mark and annoy with messages.
ivy-resume
should restore the buffer for swiper
See #302.
Enable recursive swiper
calls
While you swiper
buffer-1, you can switch out of the minibuffer into
buffer-2 and call swiper
again. Exiting the second minibuffer will
restore the first minibuffer.
To use this, you need to enable recursive minibuffers.
(setq enable-recursive-minibuffers t)
It's also useful to indicate the current depth:
(minibuffer-depth-indicate-mode 1)
See #309.
Fix for twittering-mode
The field
text property is now removed before inserting text into
the minibuffer. This fixes the swiper
problems with
twittering-mode
. See #310.
ivy
Add manual
In the current state, the manual covers the most basic topics, like the minibuffer key bindings and the regexp builders.
Make <left> and <right> behave as in fundamental-mode
Truncate minibuffer prompts longer than window-width
See #240.
C-M-n should not leave the minibuffer
Make sure that the minibuffer window remains selected as long as the
completion hasn't finished. For example, <f1> f to call
counsel-describe-function
, input "forward" and spam C-M-n to read
the doc for each function that starts with "forward". The *Help*
window popup would move the window focus, but this change moves it
back to the minibuffer.
Add flx
sorting
See #207.
Since flx is costly, move the caching to an earlier point. This means
immediate return for when the input hasn't changed, i.e. for C-n or
C-p. When flx
is installed, and (eq ivy--regex-function 'ivy--regex-fuzzy)
for current function (through ivy-re-builders-alist
), then sort the final candidates with
ivy--flx-sort
.
In the worst case, when some error pops up, return the same list. In
the best case sort the cands
that all match name
by closeness to
name
.
How to use:
- Have
flx
installed -(require 'flx)
should succeed. - Configure
ivy-re-builders-alist
appropriately to useivy--regex-fuzzy
.
For example:
(setq ivy-re-builders-alist
'((t . ivy--regex-fuzzy)))
Support hash tables
Since all-completions
also works for hash tables, no reason not to support them.
Improve documentation of ivy-count-format
Now possible to set it with Customize.
Add ivy-index-functions-alist
Customize this to decide how the index, i.e. the currently selected candidate, is updated with new input. For example, one strategy is not reset it to 0 after each change.
Another strategy, used for swiper
, is to try to select the first
appropriate candidate after (inclusive) the first previously selected
candidate. This way, if you're typing something that matches what is
currently selected, the selection won't change.
See #253.
Add ivy-virtual-abbreviate
The mode of abbreviation for virtual buffer names.
Add ivy-case-fold-search
Used to override case-fold-search
. See #259.
Add feedback for long-running async processes
Each time 0.5s pass after the last input, if the external process
hasn't finished yet, update minibuffer with the amount of candidates
collected so far. This is useful to see that long running commands
like counsel-locate
or counsel-ag
(when in a very large directory)
aren't stuck.
Promote ivy-extra-directories
to defcustom
Promote ivy-sort-function-alist
to defcustom
M-n should prefer url at point to symbol at point
C-x C-f M-n calls ffap-url-fetcher
when at URL
Highlight modified file buffers with ivy-modified-buffer
face
This new face is blank by default, but you can use e.g.:
(custom-set-faces '(ivy-modified-buffer ((t (:background "#ff7777")))))
Work with enable-recursive-minibuffers
Store the old ivy-last
in case ivy-read
is called while inside the
minibuffer. Restore it after ivy-call
.
Allow user-specified matched candidate sorting
New defcustom ivy-sort-matches-functions-alist
.
See #269 #265 #213.
By default, Ivy doesn't sort the matched candidates, they remain in the same order as in the original collection. This option is the default, since it's fast and simple.
A small problem with this approach is that we usually want prefix matches to be displayed first. One solution to this is to input "^" to see only the prefix matches.
Now, another solution is to can set:
(setq ivy-sort-matches-functions-alist
'((t . ivy--prefix-sort)))
Here's another example of using this defcustom:
(add-to-list 'ivy-sort-matches-functions-alist '(read-file-name-internal . ivy--sort-files-by-date))
After this, during file name completion, most recently changed files will be ahead.
counsel-locate
Allow customizing locate options
See counsel-locate-options
.
The current setting is:
(setq counsel-locate-options '("-i" "--regex"))
Support OSX
Use open
instead of xdg-open
. Modify counsel-locate-options
for
OSX, since there locate
doesn't support --regex
.
Use single quotes for the regex
See #194.
Add initial-input argument
See #289.
counsel-unicode-char
Add own history
counsel-M-x
Add "definition" action
Use M-o d to jump to definition.
Show current-prefix-arg
in the prompt
See #287.
counsel-find-file
Input '/sudo::' goes to current directory instead of root's home
See #283.
Improve TRAMP support
Selecting items after // now works properly.
counsel-git-grep
Use prefix arg to specify the shell command.
Allow counsel-git-grep
-> ivy-occur
-> wgrep
Using C-c C-o (ivy-occur
) while in counsel-git-grep
will produce
a wgrep
-compatible buffer.
ivy-occur
gives full candidates
This means that the " | head -n 200"
speed-up isn't used and full
candidates are returned.
counsel--find-symbol
Allow to jump back with pop-tag-mark
Using C-. in:
counsel-describe-function
counsel-describe-variable
counsel-load-library
will change the current buffer. The buffer and point can be restored
with M-* (pop-tag-mark
).
I also recommend this binding:
(global-set-key (kbd "M-,") 'pop-tag-mark)
Resolve the name clash better
When the symbol is both bound and fbound, prefer the fbound one,
unless the :caller
is counsel-describe-variable
.
counsel-ag
Add initial-directory
Support alternative initial directory which helps other packages call this function with their unique starting directory.
Fix on Windows
Using the "–vimgrep" argument improves things.
New Commands
ivy-occur
Bound to C-c C-o. Store the current completion session to its own buffer. You can have an unlimited amount of these buffers.
ivy-avy
Bound to C-'.
Speeds up selecting a candidate that's currently visible in the minibuffer.
ivy-kill-ring-save
Bound to M-w.
When the region is active, call kill-ring-save
. Otherwise, store
all selected candidates to the kill ring.
ivy-dispatching-call
Bound to C-M-o.
This is a non-exiting version of M-o (ivy-dispatching-done
).
ivy-read-action
Bound to C-M-a. Select the current action. Don't call it yet.
swiper-multi
Use swiper
in multiple buffers.
See #182.
Basic usage tips for selecting multiple buffers:
- Use C-M-m (
ivy-call
) to add or remove one more buffer without exiting. - Use C-m (
ivy-done
) to add one last buffer. - Or use C-M-j (
ivy-immediate-done
) to finish without adding more buffers. - Hold C-M-n (
ivy-next-line-and-call
) to add a lot of buffers at once.
swiper-mc
Open multiple cursors at all selected candidates.
swiper-all
New command to launch swiper
for all open file buffers. Note that
this can be excruciatingly slow if you don't clean up your buffer list
often.
counsel-grep
This is essentially swiper
for huge files. It's not as smooth as
swiper
for small files, but has a faster startup and faster matching
for files that measure in megabytes.
counsel-git-grep-query-replace
Bound to M-q. Perform query-replace
on all matches in all buffers.
counsel-jedi
Complete Python symbols using Jedi.
counsel-cl
Complete Common Lisp symbols using SLIME.
counsel-yank-pop
Give completion for inserting from the kill ring.
See counsel-yank-pop-truncate
defcustom and #218.
0.8.0
Package rename
Due to popular demand, swiper-0.7.0
is succeeded by ivy-0.8.0
in GNU
ELPA. The contents of the package don't change, only the name. Make
sure to remove the ~/.emacs.d/elpa/swiper-0.7.0
directory if you
have it and M-x package-install ivy
.
Documentation
HTML documentation is available at https://oremacs.com/swiper/.
Texinfo documentation is in doc/ivy.texi.
The HTML file shouldn't be in this repository to avoid bloat, instead it's in the gh-pages branch at https://github.com/abo-abo/swiper/tree/gh-pages.
Fixes
ivy-read
Fix recursive minibuffer exit with C-g
Make it so e.g. C-h f C-h v C-g goes back to the describe-function
selection.
Ensure the return result
In some cases, read-from-minibuffer
will return the whole minibuffer
contents (i.e. all available candidates). Return ivy--current
instead.
Insert intermediate candidates during async completions
See #340.
Initialize ivy-last
to empty state
See #352.
Fix extra actions for completing-read
See #337.
Support a list of symbols as collection
See #375.
Define setq-local
and defvar-local
unless defined
With this commit, Ivy works on emacs-24.2. See #415.
Make M-o not modify the action
See #454.
Make sure user keybindings are respected
See #466.
Fix read-file-name
with a specified dir
See #475.
Don't highlight the match in the file part
See #483.
Add a few tests for alists
ivy-occur
Fix default-directory
This way, next-error
etc will work properly.
ivy--regex-plus
Recognize ! at the beginning of the str
See #318.
Prettify a bit
See #344.
Don't consider \\(?...\)
a group
See #393.
ivy--get-window
Always return a valid window
Even if state
is invalid.
ivy--reset-state
Don't null initial-input
This is specifically for 'read-file-name-internal
collection. The
input needs to be set to nil for e.g. rgrep
, which supplies the
absolute path as initial-input
, resulting in a mess.
For now, don't set input to nil if :action
was passed to ivy-read
.
See #336.
Don't deactivate region
See #377.
ivy-completion-in-region
Use completion-all-completions
See #341.
Optimize for 1 candidate
When there's only one candidate, call the action immediately.
Add feedback for 1 candidate
When the sole completion is the same as the input, notify the user. See #350.
Bind completion-ignore-case
It's convenient to have it the same value as case-fold-search
.
ivy-read-action
Give enough minibuffer space
See #402.
Allow to customize the action hint formatter
See #469.
ivy-next-history-element
No "\\_<" for dynamic-collection
"\\_<" regex is Emacs-specific and should only be done if
:dynamic-collection
is nil. It is nil for counsel-git-grep
with
repositories < 20000 lines, but non-nil for larger ones.
Fixes #409.
ivy-occur-press
Pulse no longer
Repeated pulses within a short time span resulted in horrible window flickering.
ivy-resume
Add a guard against null :action
ivy-dispatching-done
Allow to exit with no candidates.
swiper
Improve for multiple occurrences on one line
See #314.
Fix "backward" search
When none of the previous candidates after the point match the current input, instead of returning 0, return the index of the last matching candidate. This is a good choice, because that candidate is the closest to the point of the initial search start.
See #319.
Return point
See #370.
Update regexp-search-ring
See #89.
Always remove '(field) text property
Allows to search better in modes for shell interaction.
counsel--async-sentinel
Fix issue with ivy--regex-ignore-order
See #342.
Re-display when no cands
Recognize error codes other than 1
See #394.
counsel-git
Fix window selection.
Use with-ivy-window
, so that each new file chosen with e.g. C-M-n is
selected in the same window.
compilation warnings
See #324.
New Features
ivy-read
Use flx
for highlighting fuzzy matches
See #207.
Simplify the signature for :dynamic-collection
functions
When given :dynamic-collection
, assume the collection function only
needs one argument - the string input.
Modify M-n prediction when region is active
When the region is active and M-n is called, insert the region
contents into the minibuffer and deactivate the region. The region
deactivation is done for swiper
, to make it easier to search for
multiple words or a subword.
Allow to compose collections
- Example 1: async collection
Stack
recentf
on top ofcounsel-locate
:(defun small-test () (cl-subseq recentf-list 0 10)) (ivy-set-sources 'counsel-locate '((small-test) (original-source)))
Here, (original-source) represents the async candidates of
counsel-locate
. All extra sources are static - each function is called once to generate a list of strings, which will be filtered later.The order matters, so you can have e.g.:
(ivy-set-sources 'counsel-locate '((original-source) (small-test)))
See #373.
- Example 2: sync collection
(defun my-extra-source () (append (when (eq 'Git (vc-backend (buffer-file-name))) (list "git1" "git2" "git3")) (when (file-exists-p "doc/Changelog.org") (list (propertize "doc/Changelog.org" 'face '(:background "red")))))) (defun my-find-file () (interactive) (ivy-read "Find file: " 'read-file-name-internal :action (lambda (x) (with-ivy-window (find-file (expand-file-name x ivy--directory)))) :require-match 'confirm-after-completion :history 'file-name-history :caller 'my-find-file)) (ivy-set-sources 'my-find-file '((my-extra-source) (original-source)))
The function
my-find-file
knows nothing about the extra source, it's only purpose is to introduce a:caller
to attach things to, as to not to mess up e.g.counsel-find-file
.The function
my-extra-source
gets called once inivy-read
viaivy--reset-state
. It takes no args and returns a list of strings, possibly empty.
Improve documentation UI
Add ignore pattern toggling
C-c C-a is bound to ivy-toggle-ignore
- a new command to toggle ignore
patterns (user-configured filtering). If the ignore patterns are
enabled and there are zero candidates after ignoring, display the ones
that match the current text. This feature currently works for
ivy-switch-buffer
and counsel-find-file
.
See #369.
ivy-set-occur
Allows to customize ivy-occur
per-command.
ivy-occur-mode
New commands on j, k, c
(ivy-occur-toggle-calling): New command bound to c. (ivy-occur-next-line): New command bound to j. (ivy-occur-previous-line): New command bound to k.
This makes ivy-occur
much more convenient, instead of gjgjgjg, just
cjjj. Especially good for commands that change the contents of the
other window, like describe-function
or counsel-git-grep
.
Example:
- C-h f (
describe-funtion
) run
(self-insert-command
)- C-c C-o (
ivy-occur
); C-o u also works. - cjjjjkkkk
New command ivy-occur-revert-buffer
on g
Does what e.g. revert-buffer
does for Help buffers.
Has special handling for counsel-git-grep
, counsel-ag
and
counsel-grep
: will run the shell command once more and reflect the
updates in files.
Move ivy-occur-press
from g to f.
Improve the feedback for j and k
The overlays will be more responsive now.
ivy-re-builders-alist
Allow this-command
to be a key
Example:
(defun asdf () (interactive) (completing-read "prompt: " '("abc" "abcd" "def"))) (global-set-key (kbd "C-c t") 'asdf) (setq ivy-re-builders-alist '( (asdf . ivy--regex-fuzzy) (t . ivy--regex-plus)))
This is useful for commands that you didn't write. For new commands
that you write, consider using ivy-read
and :caller
.
See #330.
ivy-set-actions
Call with t
to affect all commands
Example:
(ivy-set-actions t '(("i" insert "insert")))
Now an "insert" action will be available for all ivy-read
sessions
when pressing M-o.
See #337.
ivy-faces
New defcustom group. See #389.
ivy-flx-limit
New variable. Configure when flx
is used.
See #207.
ivy-inhibit-action
New variable. See #363.
ivy-do-completion-in-region
New defcustom. See #367.
ivy-fixed-height-minibuffer
New defcustom.
When non nil, fix the height of the minibuffer during ivy completion
at ivy-height
. This effectively sets the minimum height at this level
and tries to ensure that it does not change depending on the number of
candidates.
See #353.
ivy-set-display-transformer
ivy-add-newline-after-prompt
ivy-switch-buffer
Add virtual views
ivy-views
variable stores pre-defined views. Allows to set a window
configuration with many buffers from ivy-switch-buffer
.
How to use: just set ivy-views
appropriately. An example value is
provided (but nulled, so that it's empty initially).
ivy-use-ignore-default
swiper
Improve swiper-query-replace
To replace a symbol with a similar symbol,
- Press C-s M-n for
swiper
and select the symbol at point as input. - Press M-q for
swiper-query-replace
- Press M-n to yank the symbol to replace.
- Edit the replacement and RET.
Here step-3 was modified to yank e.g. "symbol" instead of "\_<symbol\_>" previously.
swiper-font-lock-exclude
New variable for major modes that misbehave with font-lock-ensure
.
See #346.
counsel-mode
Allow use of describe-prefix-bindings
See #441.
counsel-find-file
Add initial-input
See #336.
Change tramp prompt from "Find File: " to "user@host: "
Bind counsel-up-directory
to C-DEL
New function that moves up to the parent directory and at the same time preselects the current directory. This is useful for moving up and down a file tree quickly.
See #343.
Customize M-n
action
This feature allows to quickly visit Github issues from either
magit-commit-mode
or from a version-controlled file. The point has to
be at the "#" char in e.g. "#123", that represents an issue.
It's possible to customize ivy-ffap-url-functions
to do a similar
thing for places other than Github.
The C-x C-f M-n key binding will work better with counsel-find-file
,
for plain find-file
it will open a dired
buffer in addition to opening
the URL.
Can un-ignore dotfiles with a leading dot input
When ivy-text
starts with a dot, don't use
counsel-find-file-ignore-regexp
. The generic way to do this is with
C-c C-a (ivy-toggle-ignore
), but this is faster and more convenient.
See #408.
Bind M-o f to find-file-other-window
Correctly expand file name at point
See #430.
Add display transformer
See #458.
Add magic slash that changes the directory
Update to the behavior: the slash ("/") will enter a directory even if its name isn't completely typed out if either:
- It's the only candidate.
- The candidate index isn't 0, i.e. "C-n" has been typed at least once.
- The input isn't "/".
The above rules still allow to keep the old behavior with "//" moving to root and "/ssh:" opening tramp.
This is an experimental feature, please report if it breaks someone's workflow.
counsel-git-grep
Bind C-c C-m to counsel-git-grep-switch-cmd
The initial command always runs on all files.
To run only on *.el files, C-c C-m followed by M-i -- *.el
.
To run on *.c and *.h files, C-c C-m followed by M-i -- *.c *.h
.
To switch to all files again, C-c C-m and select the appropriate
entry.
See #420.
counsel-locate
counsel-locate-cmd
counsel-locate-cmd-mdfind
New function. See #390.
counsel-locate-cmd-es
New function. See #426.
counsel-yank-pop
Truncate during display
During the completion, only the context around the match will be shown.
By default, the context is +2 lines above and +2 lines below the match.
It can be adjusted with counsel-yank-pop-truncate-radius
.
Additionally, ivy-height
is temporarily bound to 5 during completion.
This way, the maximum minibuffer height should be 1+4*5=21 lines.
See #315.
counsel-unicode-char
Display hex codes in left column.
counsel-rhythmbox
Preselect the current song
counsel-ag
counsel-ag-base-command
Allows the command run by counsel-ag-function
to be customized. There
are several reasons to allow this: The vimgrep option is a recent
addition; on windows it's more convenient to use pt; and the user
might want to customize ignored files.
Standard value:
(setq counsel-ag-base-command "ag --nocolor --nogroup %s -- .")
See #335.
Add dir prompt for C-u
See #429.
Add counsel-ag-map
See #462.
counsel-async-split-string-re
New defcustom.
counsel--async-cmd
Add optional exit-code table
This argument can be used to associate exit codes with the underlying reason. Used in counsel-ag-function to signal that an exit code of 1 means that no matches were found.
See #421.
counsel-grep
Reveal outlines
Just like swiper
.
Should pick candidates closest to point
Fixes the algorithm selecting the first matching candidate in case there are 0 matching candidates following point. Now the last matching candidate will be selected, resulting in less scrolling.
Speed up x40 times
The default shell command will not use --ignore-case
switch for
grep
. It's a bit less convenient, but results in a huge speed-up.
New Commands
counsel-tmm
Completion for the menu bar items. For example:
counsel-tmm
-> Options
-> Set Default Font...
.
Thanks to completion, the latter stages of the chain would look like: op
RET set
RET.
counsel-imenu
counsel-decbinds
Show a list of all defined keys, and their definitions. Describe the selected candidate. See #332.
counsel-list-processes
ivy-switch-buffer-other-window
counsel-git-stash
counsel-git-log
Call the git log --grep
shell command and search through the output.
counsel-pt
counsel-linux-app
counsel-ace-link
Ivy completion for ace-link
.
counsel-esh-history
counsel-shell-history
Browse shell history.
counsel-grep-or-swiper
New command: automatically use swiper
for smaller buffers and
counsel-grep
for larger buffers.
Adjust with:
(setq counsel-grep-swiper-limit 300000)
By default, the splitting predicate is 300K bytes in a file.
0.9.0
Fixes
counsel--gg-sentinel
Check for an additional 141 return code.
counsel-ace-link
Use cdr
for action. See #835.
counsel-find-file
Improve stability on arcane systems
It can happen that (all-completions "" 'read-file-name-internal)
may
fail on systems with symlinks. I think it's related to the file
functions trying to compute occupied space. In any case, a plain
directory-files
is roughly the equivalent and is less likely to fail.
Prevent expand-file-name nil
See #518.
Don't crash if default-directory is nil
See #586.
Allow to C-y a "/ssh:" file
Press M-n on issue works for newer magit version
See #692.
Fix when initial input is a file name
See #744.
Account for file-name-directory
returning nil
See #780.
Fix RET on no input
See #782.
Fix RET when file exists
See #792.
counsel-grep
Quote :preselect
.
counsel-grep-or-swiper
Don't grep on compressed files. See #536.
counsel-load-theme
Add noconfirm flag in counsel-load-theme-action
.
counsel-org-tag-action
Perform in the minibuffer. See #890.
counsel-recoll
Add shell-quote-argument
. See #713.
counsel-rhythmbox
No longer depends on helm-rhythmbox
.
counsel-yank-pop
Fix candidates not showing sometimes.
doc
Added ivy-format-function
to the doc
See #577.
Added info on generating the doc
See #601.
Added info on associating values
See #714.
Update package names on ELPA/MELPA
See #833.
ivy--filter
ivy--flx-sort
Improve. See #843.
ivy--format-minibuffer-line
Fix for ivy-display-style
nil. See #828.
ivy--minibuffer-setup
Fix max-mini-window-height
. See #732.
ivy--occur-insert-lines
Scroll to first command. See #829.
ivy--regex-ignore-order
Ensure it returns legal regexps. See #765.
ivy--reset-state
Simplify. See #827.
ivy--virtual-buffers
Don't modify recentfs or bookmarks. See #821.
ivy-completion-in-region
ivy-completion-in-region-action
ivy-fixed-height-minibuffer
Add correction. See #737.
ivy-help-file
Define with defconst
, see #938.
ivy-immediate-done
Update docstring, see #525.
ivy-minibuffer-map
Move ivy-toggle-regexp-quote
from M-q to M-r.
See #566.
Remap backward-delete-char-untabify
to ivy-backward-delete-char
ivy-occur-press
Pass the whole cons cell to action, see #634.
ivy-partial
Fix for :dynamic-collection
.
See #946.
ivy-remote
Use a lighter color for dark themes, see #646.
ivy-resume
The original default-directory
will be restored, see #591.
ivy-sort-functions-alist
Improve. See #870.
ivy-switch-buffer-other-window
Obey ivy-ignore-buffers
. See #745.
Recursive minibuffers with two emacsclients
See #738.
swiper
Fix "foo!bar" syntax
See #565.
Now respects ivy-re-builders-alist
See #613.
Example:
(setq ivy-re-builders-alist '((swiper . ivy--regex-fuzzy) (t . ivy--regex-plus)))
swiper-avy
Require avy
, see #593.
swiper-font-lock-exclude
New Features
counsel-bookmark
counsel-bookmark-avoid-dired
When non-nil and a directory is selected from counsel-bookmark
,
forward the choice to counsel-find-file
instead of opening a dired
buffer. See #813.
counsel-find-file
Add binding to jump to a bookmarked directory without quit
Press M-o b to set the current directory to one of the virtual buffers' directories. You continue to select a file from that directory.
See #531.
Add counsel-find-file-root
Press M-o r to find the current file as root. See #948.
counsel-git-grep
Support custom per-project commands
The idea is to grep several Git repositories at once. For example, my Emacs config is a Git repository with many Git submodule repositories inside.
When used with C-u, and inside counsel-git-grep-projects-alist
, use
the corresponding command instead. Additionally,
counsel-git-grep-proj-function
is used.
For a possible implementation of the custom git-grep command, see: https://github.com/abo-abo/oremacs/commit/c7effdb94749dc600b1204ea7a9db319ebdb0f00
See #616.
Reveal text hidden in outlines
Works with "Git for Windows" and native Emacs build
Fix for files with spaces in the name
See #700.
Fix g (counsel-git-grep-occur
)
Things go wrong when `ivy-text' is changed from the original value.
Extract ivy-text
from the buffer name.
Quote the directory name. See #811.
Update quoting
See #876.
counsel-git-grep-cmd-default
The initial value for counsel-git-grep-cmd
.
counsel-linux-app
counsel-linux-apps-directories
Customize the search path.
counsel-mode
Bind counsel-info-lookup-symbol
Substitutes info-lookup-symbol
, see #493.
Bind C-r for eval-expression
and shell-command
Press C-r while inside the minibuffer during eval-expression
or
shell-command
to get completion for history.
counsel-pt
Add initial-input
arg. See #757.
counsel-unicode-char
Add leading zeros to the display
See #662.
Support universal argument
See #868.
ivy
completion at point
ivy-action-wrap
Set this to have ivy-next-action
and ivy-prev-action
wrap around.
ivy-add-actions
This is a convenience extension to the existing ivy-set-actions
.
See #470.
ivy-case-fold-search
additional value 'always
If the value of ivy-case-fold-search is set to 'always, the search is always case-insensive, regardless of the input. See #916.
ivy-completion-in-region-action
Add support for multiple-cursors
, see #547.
ivy-set-prompt
Allow to set the prompt using the :caller
as key.
ivy-set-prompt-text-properties-function
An advanced override of the prompt string.
ivy-sort-file-function-using-ido
Extends the options for sorting file names. See #498.
ivy-completing-read
Set :caller
to this-command
Improves sorting customization. See #899.
Don't :require-match
for null
See #909.
ivy-completing-read-handlers-alist
New defcustom. See #892.
ivy-minibuffer-map
Alternative action list M-o using Hydra
Not hiding the candidates and using a single line for actions results in a more distraction-free experience.
Use this code to turn it on:
(require 'ivy-hydra)
ivy-occur-mode
RET now switches to candidate window
read-only-mode
is enabled
See #720.
Set view-read-only
locally
See #789.
Run wgrep-setup
See #904.
ivy-read
Make key binding for other window action consistent
By default, M-o j will select the file or buffer in other window, for
both ivy-switch-buffer
and counsel-find-file
.
Facilitate sorting of cons cells
See #554.
(defvar ivy-sorter-data '(("b 1" . 1) ("a 2" . 2) ("d 0" . 0) ("c 5" . 5))) (defun isn (a b) (< (cdr a) (cdr b))) (add-to-list 'ivy-sort-functions-alist '(ivy-sorter . isn)) (ivy-read "string: " ivy-sorter-data :sort t :caller 'ivy-sorter)
Add prefix arg for action functions
See #552.
Single actions:
C-m | ivy-done | store prefix |
M-o | ivy-dispatching-done | store prefix |
C-j | ivy-alt-done | store prefix |
C-M-j | ivy-immediate-done | store prefix |
TAB TAB | ivy-partial-or-done | unsupported |
C-' | ivy-avy | unsupported |
Multiple actions:
C-M-m | ivy-call | store prefix, type prefix again for next call |
C-M-o | ivy-dispatching-call | store prefix, type prefix again for next call |
C-M-n | ivy-next-line-and-call | store prefix, type prefix again for next call |
C-M-p | ivy-previous-line-and-call | store prefix, type prefix again for next call |
An example application:
no prefix prints first number in a message-box one prefix prints last number in a message-box numeric prefix selects the index to print in a message-box
(ivy-read "choose: " '(("a" 1 2 3) ("b" 3 4 5)) :action (lambda (x) (message-box "%s" (cond ((null ivy-current-prefix-arg) (elt x 0)) ((equal '(4) ivy-current-prefix-arg) (car (last x))) (t (elt x (prefix-numeric-value ivy-current-prefix-arg)))))))
Breaking change for alist type collection actions
The action will be called with collection's ITEM
, instead of (cdr
ITEM)
like before. This allows to simplify the logic of complex action
functions: they don't have to look up the full item by string in their
own collection, moreover they don't have to know anything about their
collection.
Implement unique index for alist completion
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.
Make with-ivy-window
not necessary in the action function
This allows for a lot of simplification, e.g. use insert
instead of
(lambda (x) (with-ivy-window (insert x)))
.
See #639.
ivy-switch-buffer
Add ivy-sort-function-buffer
Puts e.g. the *scratch*
buffer ahead of the misc
buffer if the input
is "sc", since it's almost like a prefix match.
See #595.
ivy-switch-buffer-faces-alist
Allow to customize faces in ivy-switch-buffer
by the mode of each buffer.
Example:
(setq ivy-switch-buffer-faces-alist
'((emacs-lisp-mode . swiper-match-face-1)
(dired-mode . ivy-subdir)
(org-mode . org-level-4)))
swiper
Add option for swiper line number to be searchable
See swiper-include-line-number-in-search
and #562.
Restore window position after using swiper.
Relevant for high settings of scroll-conservatively
.
See #643.
Improve fuzzy highlight
Add char-fold-to-regexp
See #622.
Add compatibility with evil-ex-search
See #887.
Apply evil
search highlighting
See #888.
Set evil-ex-search-direction
See #947.
swiper-goto-start-of-match
swiper-avy
works with more regexp builders
See #932.
swiper-all
Is now async
This means extremely fast startup time.
Additionally, the feedback to input is quite fast even with a hundred
buffers. This is because, unlike swiper
, line numbers are not
computed. Computing line numbers, while situationally useful, is
really slow for huge buffers, and even slower for dozens of huge
buffers.
See #620.
Press M-q for query-replace
See #623.
Ignore TAGS buffers
See #787.
Consider magit stash buffers
See #819.
Fix case-fold-search
See #880.
New Commands
counsel-bookmark
counsel-colors-web
See #815.
counsel-command-history
See #826.
counsel-company
counsel-dired-jump
Like, counsel-file-jump
, but for directories.
counsel-dpkg
Completion for dpkg -l
.
counsel-faces
See #815.
counsel-find-library
counsel-hydra-heads
Call a head of the current/last hydra by name. See #696.
counsel-irony
Inline C++ completion using Irony.
counsel-mark-ring
See #834.
counsel-org-agenda-headlines
See #825.
counsel-outline
Completion for outlines in the current buffer.
counsel-recentf
counsel-rg
counsel-rpm
Call the rpm
shell command. See #695.
counsel-semantic
Completion for semantic tags.
counsel-set-variable
counsel-shell-command-history
Search through history in shell-mode
. See #689.
When counsel-mode
is on, M-! C-r will call
counsel-shell-command-history
.
ivy-push-view
And ivy-pop-view
.
- Use
ivy-push-view
to store a view - your current window tree. This contains: all windows on the current frame, and their configuration w.r.t. horizontal or vertical splits. The point positions in each window are stored as well. - Use
ivy-switch-buffer
to select stored views. - Use
ivy-pop-view
to delete a stored view that you don't want any more.
See #584.
ivy-rotate-sort
Modify ivy-sort-functions-alist
to allow a list of sorting functions
to apply to a collection. The car of this list is the current
one. ivy-rotate-sort
then rotates this list through the different
possibilities. Bound to C-c C-s. Here is a simple example to
illustrate.
(setq ivy-sort-functions-alist
'((read-file-name-internal .
(ivy-sort-file-function-default string-lessp string-greaterp))
(internal-complete-buffer . nil)
(counsel-git-grep-function . nil)
(Man-goto-section . nil)
(org-refile . nil)
(t . string-lessp)))
M-x find-file
RET C-c C-s now switches from the default sorting to
using string-lessp
. C-c C-s again switches to string-greaterp
and so
on.
0.10.0
Fixes
counsel-ag
Fix default ag command on Windows, see #1221.
counsel-company
Various fixes, see #969.
counsel-descbinds
Fix regex, see #1089.
counsel-dired-jump
Obey find-program
, see #1181.
counsel-find-file
counsel-find-file-occur
Use xargs -d '\n'
, see #1323.
counsel-git-grep-recenter
Fix warning, see #1097.
counsel-git-grep-transformer
Optimize text props, see #1264.
counsel-git-log
Ignore blank candidates, see #1122.
counsel-git-occur
Fix regex, see #1299.
counsel-grep-base-command
Add "–", see #1266.
counsel-imenu
counsel-irony
Various fixes, see #1018.
counsel-locate-action-extern
Handle cygwin, see #1314.
counsel-package
Fix package removal, see #970.
counsel-set-variable
Handle defcustom with multiple entries, see #960.
counsel-shell-history
Work around ring-elements
, see #1148.
counsel-unquote-regex-parens
Handle cons arg, see #1322.
ivy
Various fixes, see #997, #1327, #1334, #1336.
Don't add :preselect
to collection, see #1017.
Avoid setting ivy window as minibuffer, see #1051, #1053.
Init index with 0, see #1080.
ivy-initial-inputs-alist
should use :caller
first, see #1068.
ivy--sorted-files
should always use predicate, see #1121.
Simplify re-builder / highlight, see #1147.
Ensure bookmarks are loaded, see #1160.
Fix arrows not working for ivy--regex-ignore-order
, see #1159.
Fix C-M-j for ivy-completion-in-region-action
, see #1178.
Correct spelling, see #1179.
Ensure action and display transformer are called from initial buffer. See #1182.
Allow "!" and space to be escaped in ivy--regex-ignore-order
. See #976.
Call ivy-overlay-cleanup
only when needed, see #1211.
Don't require prompt to end in ": ", see #1207.
Remove empty string from collection, see #1230, #1236.
Fix "/sudo::" in current dir, see #1232.
Fix prefix issue, see #1244.
Update prompt even if there are no candidates. See #1183.
Also check this-command
for sorting, see #1294.
ivy-add-actions
Delete action duplicates by key, see #1296.
ivy-avy
ivy-completing-read-handlers-alist
Add some entries, and tests. See #1049.
ivy-display-function-overlay
ivy-ffap-url-functions
Check if git is present, see #1216.
ivy-format-function-arrow
Fixup, see #1004.
ivy-initial-inputs-alist
Fix entry for man, see #1226.
ivy-occur
ivy-partial
ivy-previous-line-or-history
Should not insert the last history item unless the currently-selected completion candidate is the first in the list, otherwise it's impossible to navigate back up with successive applications of this command, see #1137.
ivy-re-builders-alist
Extend docstring, see #1308.
ivy-with-r
Use with-output-to-string
, see #1300.
swiper–init
Turn off reveal-mode
for the duration, see #1312.
swiper-all-buffer-p
Various mode additions.
New Features
counsel
counsel-async-filter-update-time
Configure async delay. See #1149.
counsel-async-ignore-re
New defcustom. See #1122.
counsel-describe-function-function
Customize counsel-describe-function
. Useful for
https://github.com/Wilfred/helpful. See #1321.
counsel-describe-function-preselect
counsel-find-file-ignore-regexp
Offer completion-ignored-extensions
, see #1092.
counsel-fzf-dir-function
Allow to customize fzf work directory.
counsel-git
Add optional initial-input
, see #1074.
counsel-git-log-split-string-re
New defcustom. See #1122.
counsel-grep-or-swiper
counsel-imenu-map
counsel-linux-app
counsel-mode-map
Add counsel-faces
, see #1259.
counsel-rg
counsel-unicode-char
counsel-up-directory
counsel-url-expand
Added to ivy-ffap-url-functions
by default.
Customize counsel-url-expansions
to be able to browse various links
with C-x C-f M-n. See #1164.
counsel-yank-pop
ivy
Add i and w as global actions
In any completion session:
- 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.
Bind <next> and <prior>
ivy-auto-select-single-candidate
Off by default. When on, and there's only one candidate, use it automatically without a completion session.
ivy-backward-delete-char
Preselect last dir, see #1257.
ivy-completion-in-region
Use :initial-input
and :unwind
. Previously, Ivy's "prefixing" and
"perfect match" index logic was messed up for
completion-in-region. The reason being is that the initial prefix was
never passed to Ivy: instead, the collection was pre-filtered on the
prefix and a "new" completion session didn't know about it.
ivy-occur
When completing file names, counsel-cmd-to-dired
is called, resulting
in a Dired buffer.
ivy-occur-mode-map
Bind R to read-only-mode
, see #1273.
ivy-read-action
Allow to quit with ESC for better work with evil, see #952.
ivy-rotate-preferred-builders
ivy-switch-buffer
ivy-truncate-lines
New defcustom. See #1110.
ivy-use-selectable-prompt
swiper-query-replace
Disable read-only for the duration, see #1273.
New Commands
counsel-file-register
Completion for file registers, see #1057, #1066.
counsel-git-change-worktree
Completion for git-worktree. See #989, #1114, #1115.
counsel-git-checkout
Completion for git-checkout. See #1187.
counsel-minibuffer-history
Supersedes counsel-expression-history
and
counsel-shell-command-history
. See #1237.
counsel-org-capture
Completion for org-capture. See #1320.
counsel-org-file
Browse all attachments for the current Org file.
counsel-org-goto-all
Completion for Org headings in all open buffers. See #1005.
counsel-switch-to-shell-buffer
Switch to a shell buffer, or create one. See #990.
ivy-occur-delete-candidate
Bound to C-d in ivy-occur-mode
. Allows a sort of a todo-list workflow.
0.11.0
Fixes
colir-blend-face-foreground
Add hack for :foreground
. Related to ansi-color-apply
. See #1293.
counsel
Make process sentinels more robust. See #1483.
Fix behavior on remote. See #1522.
Extend unquote-regex-parens tests. See #1704, #1708, #1863.
Use counsel-async-split-string-re
more. See #1384, #1778.
Use start-file-process
for counsel--async-command
. See #1821.
counsel--async-filter
should write candidates only in the
minibuffer. See #1772, #1837, #1857.
Robustify grep-like ivy-occur. See #1845, #1800, #1835.
counsel-ag
counsel-bookmark
Specify :history
. See #1698.
counsel-colors-list
counsel-company
Unwind with company-abort
. See #1793.
counsel-describe-face
Add caller. See #1619.
counsel-describe-function
counsel-find-file
Don't treat URLs as dirs. See #1398.
Allow use of "$" in dirs. See #1316.
Fix for ignore-order. See #1466.
Fix file expansion. See #1494.
Fix ivy-resume
not working when the current candidate was a
directory. See #1508.
counsel-find-file-mkdir-action
should use ivy-text
. See #1513.
Fix dir or file logic error. See #1103, #1623.
Fix inability to create a file. See #1623.
Fix issue of minibuffer height 1. See #1667.
Remove the change to post-command-hook
by ESS. See #1660.
Update minibuffer state after counsel-find-file-delete
. See #1726.
Fix for partial match of TRAMP method.
Fix Emacs26 regression when completing TRAMP methods. See #1733.
Fix Emacs25/26 compat for ivy--cd
.
Avoid TRAMP related errors in ZIP files. See #1797.
counsel-find-library
Check if dirs in load-path
exist. See #1720.
counsel-git-grep
counsel-grep
counsel-list-processes
Don't mess up the current buffer with a header line.
counsel-locate
counsel-locate-action-extern
Use start-process-shell-command
. See #1401.
counsel-minibuffer-history
Add delete-dups
. See #1358.
counsel-org-agenda-headlines
Require org. See #1642.
counsel-org-capture
Don't overlook templates contexts. See #1669.
counsel-org-goto
counsel-org-tag
counsel-outline
Only look for outline regexp at bol. See #1681.
counsel-rg
Store command persistently. See #1474.
counsel-switch-to-shell-buffer
Various improvements. See #1570.
counsel-unicode-char
Optimize. See #1704.
counsel-yank-pop
Liken to yank-pop
. Respects kill-ring-yank-pointer
. See #1190, #1356.
Interoperate better with kill-ring
. See #1133, #1360.
Save window-start
to avoid recentering of the buffer. See #1370.
Make position more robust. See #1420.
Make it work in read-only buffers. See #1523.
Work with interprogram-paste-function
. See #1523.
docs
ivy
Disable ivy-auto-select-single-candidate
for user@host entry.
See #1326, #1338.
Handle ivy-state-buffer
getting killed. See #572.
Correct highlighting for negation, e.g. counsel-M-x
"vi mo!ew".
See #1418.
Fold case during index recomputation. See #1447, #1449.
Simplify string splitting logic. See #1453.
Fix :preselect
getting deselected with new input. When there's new
input, and it still matches :preselect
, the current candidate should
not change.
Handle fallback in ivy--sort-function
. See #1561, #1565, #1567.
ivy--sort-function
should handle anonymous fns. See #1574.
Use ivy-sort-max-size
for collection functions. See #1592.
Use copy-sequence
when sorting to avoid corrupting external data.
See #1617.
Default :caller
to this-command
. See #1297, #1606, #1619, #1621.
ivy-call
should restore previous buffer. See #1607.
ivy--insert-prompt
should use ivy-add-face-text-property
for
compat. See #1634.
Use compat shim for add-face-text-property
. See #1635.
Move colir
require to top-level to improve performance. See #1571.
Fix :predicate
not getting applied. See #1158.
Drop preselected candidate after input. See #1563, #1573.
Fix ivy-left-pad
when there's horizontal scroll.
Fix ivy-state-collection
alist idx not in sync. See #1680.
Support :annotation-function of completion-extra-properties. See #1489.
Fix for alists that require sorting. See #1687.
Fontify completion annotations. See #1489, #1702.
Filter sorted alist. See #1705.
Avoid modifying alist collection. See #1706.
Use string-match-p
where applicable. See #1517.
Strip text properties from returned alist candidate. See #1706, #1724.
Don't trigger ivy--magic-file-slash
from TAB. See #1716.
Fix for terminals. See #199, #1528, #1728.
Fix overlay interacting with org-mode src blocks. See #1732.
Don't restore buffer after action. See #1766, #1767.
Remove webjump completing-read
handler. See #1802, #1049.
Use ivy-truncate-lines
also for non-graphical Emacs. See #1809.
For non-graphical Emacs set resize-mini-windows to 'grow-only. See #1809.
Fix minibuffer truncation and resizing. See #1811.
Work around void Info-complete-menu-buffer
. See #1814.
Handle Windows path separator for ivy-occur
. See #1817.
Don't switch to a killed buffer for ivy-occur-press
.
See #1834, #1842.
Improve performance ivy--select-occur-buffer
by avoiding
pop-to-buffer
.
Use all-completions
and add test. See #1832.
Do not let ivy virtual buffer faces creep into the recentf file. See #1898.
ivy-completion-in-region
ivy–kill-buffer-action
ivy–occur-insert-lines
ivy-partial
Can change current dir when completing files. See #86.
ivy–regex-fuzzy
ivy–regex-ignore-order
Improve handling of invalid regexes. See #1545.
ivy–regex-plus
ivy-rotate-preferred-builders
Update in the documentation. See #1376.
ivy-thing-at-point
swiper
Fix history modified on each char. Fix history duplicate. See #1391.
Don't replace tabs with spaces (prevents wgrep
from working
correctly). See #1468.
Allow scroll-other-window
use. See #1504.
Replace obsolete isearch-lazy-highlight-face
. See #1591.
Highlight multiple regexps correctly. See #654, #1550, #1551, #1587, #1600.
Fix when re-builder returns list. See #1692.
Add inhibit-field-text-motion
. See #1713.
Fix incorrect jump to first match. See #1791.
swiper-avy
New Features
counsel
counsel-dired-jump
New var counsel-dired-jump-args
. See #1889.
-----* counsel-find-file
New var counsel-find-file-occur-cmd
. Use it to customize what C-c C-o
calls. See #1299, #1351, #1441.
New var counsel-preselect-current-file
. When non-nil, preselect the
current file in the list of candidates. See #1363.
Bind C-M-y to counsel-yank-directory
. Useful when you want to edit
part of the directory name. See #1333.
Bind M-o d to new action counsel-find-file-mkdir-action
. See #1471.
Bind M-o f to find-file-other-frame
. See #1510.
Bind M-o k to counsel-find-file-delete
. See #1671.
Bind M-o m to counsel-find-file-move
. See #1671.
counsel-find-file-occur-use-find
defaults to t on Linux. See #1686.
Make counsel-find-file-delete
ask for confirmation. See #1774.
Make counsel-find-file-delete
clean up buffers. See #1779.
counsel-find-file-jump
New var counsel-file-jump-args
. See #1889.
counsel-git-grep
counsel-grep
New var counsel-grep-map
. Bind swiper-avy
there. See #1711.
counsel-imenu
counsel-linux-app
Add ~/.local/share/applications/
. See #1390.
Add guixsd's application directory. See #1476.
Call gtk-launch
asynchronously. See #1537.
Add dir for flatpack. See #1754.
Ignore non-readable desktop files. See #1757.
Show also hidden desktop files with prefix arg.
Add XDG defaults. See #1851.
Truncate Exec to 45 chars.
counsel-mode
counsel-M-x
counsel-rg
Read extra args when current-prefix-arg
is given. See #851.
Use smart case "-S" in counsel-rg-base-command
. See #1393.
To look for e.g. "map}", input "map\}". See #1566.
Interactively specify switches. Example in this repo: "-g*.el – require", "-g*.org – require", "-g!*.el – require". See #1408, #1512, #1688, #1559.
counsel-rhythmbox
Refresh list with prefix arg.
Re-launch rhythmbox if not playing.
Bind M-o s to counsel-rhythmbox-toggle-shuffle
.
counsel-semantic
Add pretty formatting, expand types recursively. See #702.
counsel-set-variable
counsel-yank-pop
New var counsel-yank-pop-height
: configure ivy-height
. See #1365.
New var counsel-yank-pop-filter
: All elements of kill-ring
for which
this function returns nil will be permanently deleted from kill-ring
before completion. See #1356, #1367.
New var counsel-yank-pop-preselect-last
: customize whether preselect
the last kill by default. See #1371, #1373, #1374.
New var counsel-yank-pop-after-point
. See #884, #1761, #1762.
New face ivy-separator
. See #1815.
ivy
Interpret mouse events in the minibuffer managed by ivy. You can now scroll with the mouse wheel and click to select a candidate. See #1278, #1279.
Support multi-character action keys. See #1394.
ivy-display-functions-alist
can use t key as fallback. See #1443.
New var ivy-display-functions-props
useful when customizing display
functions.
See #1443.
New cmd ivy-kill-whole-line
overrides kill-whole-line
in the
minibuffer. See #1456.
New option for ivy-virtual-abbreviate
: 'abbreviate
. See #1460.
New var ivy-height-alist
. Customize ivy-height
per-command. See #1531, #1722.
New var ivy-completing-read-dynamic-collection
. See #1524.
New cmd ivy-yank-char
similar to isearch-yank-char
. See #1588.
New cmd ivy-yank-symbol
. See #1604.
Bind <right> to ivy-forward-char
. See #1622.
New var ivy-highlight-grep-commands
that lists counsel grep-like
commands. See #1661.
New face ivy-modified-outside-buffer
. See #1742, #1745.
Propertize matches in ivy-occur
buffers. See #1795.
ivy-immediate-done
with empty input will return the default.
See #1170, #1719.
ivy-read
argument prompt
is no longer a format string. Use only
ivy-count-format
to add/remove candidate count. See #1350.
New face ivy-grep-info
and ivy-grep-line-number
. See #1839, #1840.
New face ivy-org
, ivy-completions-annotations
. See #1847.
Highlight yanked word. New face ivy-yanked-word
.
See #1581, #1850, #1856, #1859, #1861.
New var ivy-pulse-delay
. See #1859.
ivy-initial-inputs-alist
entries can be functions. See #1867, #1868.
New var ivy-hooks-alist
. See #1899.
ivy-occur-grep-mode
Press w for ivy-wgrep-change-to-wgrep-mode
. See #1341.
ivy-occur-next-line
Useful also in the original buffer.
Jump to first candidate when in header.
ivy-preferred-re-builders
Renamed from ivy-preferred-re-builders
.
ivy-push-view
Overwrite view with prefix arg. See #1737.
ivy-switch-buffer
Extract all actions to defuns so that they can be advised or reused. See #1490.
swiper
Add test to history even for C-g. See #1305.
New var swiper-stay-on-quit
. When non-nil don't go back to
search start on abort. See #1319.
Add integration with evil s expressions. See #1406, #1452.
Obey dired-isearch-filenames
. See #1415.
Better negation highlighting. For example, in ivy.el search for "ivy len!–". See #1418.
swiper-all
Add optional initial-input
arg. See #1375.
swiper-font-lock-exclude
swiper-occur
Allow to capture groups from input. Example: "defvar \([a-z-]+\)" C-c C-o.
New Commands
counsel-bookmarked-directory
Completion for bookmarked directories. See #1657.
counsel-down-directory
Descend into a directory for counsel-find-file
. See #1891.
counsel-evil-registers
Ivy replacement for evil-show-registers
. See #1368.
counsel-org-entity
Insert an Org entity using ivy. See #1459.
counsel-semantic-or-imenu
counsel-wmctrl
Select a desktop window with completion.
ivy-switch-buffer-kill
New command bound to C-c C-k for ivy-switch-buffer
. Use this to kill
one or more buffers while still in the minibuffer.
0.12.0
Fixes
counsel-ag
Don't allow newlines in wildcards when using ivy--regex-fuzzy
. See #1907.
counsel-company
counsel-find-file
Add nested hidden dotfiles to counsel-find-file-ignore-regexp
. See #1820.
Add lockfiles to counsel-find-file-ignore-regexp
. See #2117.
Improve mkdir action with ivy-call
: cd into the created directory.
Improve delete action with ivy-call
: stay in the directory.
Improve copy and move actions. See #2053.
counsel-locate
Use a non-regex locate on BSD. See #1950.
counsel-org-file
Handle ATTACH_DIR
property. Re-use org-attach-dir
. See #2042.
counsel-org-goto-all
Use org-mode outline settings. See #1947.
counsel-org-tag-agenda
counsel-package
Strip space from the initial input. See #1998.
counsel-recentf
Require match. See #2043.
counsel-rhythmbox
Add :require-match
.
counsel-unicode-char
documentation
ivy-initial-inputs-alist
is now a defcustom.
swiper-mc
docstring. See #1879.
Update ivy.org. See #1951, #2046, #2143.
Mention char-fold-to-regexp. See #1977.
Mention automatically integrated packages in ivy.org. See #1674.
Remove outdated magit customization. See #2035.
ivy-read
docstring. See #2107.
ivy-reverse-i-search
docstring. See #2126.
Add autoloads for various commands. See #2131.
ivy-avy
Fix when there's a scroll.
ivy-completion-in-region
Don't insert initial-input if nil. See #2086.
ivy-help
Set org-hide-emphasis-markers. Reveal all Org contents. See #2021. Hide Org markup locally. See #2085.
ivy-immediate-done
Improve for make-directory. See #1170, #1719, #2139.
ivy-insert-current
Insert text without properties. See #2040.
ivy-next-history-element
Use minibuffer-default for dired-dwim-target.
(setq dired-dwim-target t)
Is a nice productivity boost. Except for the situation when you want to copy the file to the current directory, and a different directory is preselected instead. When this happens, you can now press M-n to select the current directory.
ivy-occur
Make ivy-switch-buffer-occur work with multi-pass regex builders. See #1973.
Make find-file-occur work with multi-pass regex builders. See #1984.
Make grep-occur work with multi-pass regex builders. See #2033.
Make swiper occur wgrep work for narrowed buffers. See #1848.
Don't setq-local ivy--directory
. See #1866.
Don't hightlight the file name part. See #2073.
Fix missing line numbers. See #2076.
Fix for counsel-find-file
. See #2094.
ivy-occur-revert-buffer
should stay on the same line.
ivy-occur-press
Improve when the window config was changed.
ivy-partial
Works better when selecting files. See #2103.
ivy-read
Allow to override global actions per command. See #1873.
Require TRAMP earlier so that there's completion. See #1918.
Allow all re-builders to use ivy-highlight-grep-commands
. See #1983.
Improve column calculation in ivy-dispatching-done-hydra
.
Allow recursive minibuffers to use ivy-display-functions-alist
. See #1995.
Don't use invalid :preselect
as a regexp. See #2002.
Allow to select "" when prompt is selectable. See #1924.
Fix all-completions returning $$. See #2012.
Fix matcher not called on input "". See #2013.
Fix filter for ivy--regex-ignore-order
. See #2015.
Don't offer virtual buffers for plain switch-to-buffer. See #839.
ivy-completion-in-region-action
obeys :exit-function.
Shrink ivy window after reading action. See #2079.
Use single face for highlighting adjacent groups. See #2080.
Use ivy-flx-limit
more. See #2081.
Fix ivy-read-action
. See #2082.
Set line-spacing to nil in the minibuffer. See #2118.
ivy-reverse-i-search
Don't bind ivy-recursive-restore to nil. See #1215.
ivy–sort
Higher priority for ivy-sort-matches-functions-alist
. See #2136.
ivy-switch-buffer
ivy-thing-at-point
Extend. See #1871.
ivy-use-selectable-prompt
Don't highlight if not needed.
swiper
Fix blinks in non-graphical Emacs. See #1921, #1923.
Documentation. See #643.
Don't rely on window-start in terminal. window-start and window-end is not reliable when in a terminal. It can be made reliable if a redisplay is performed, but then we get annoying blinking. See #1928.
Add extra condition to recenter in terminal. See #2059.
Fix overlays clean up. See #2064.
Obey search-invisible. See #1739.
Improve highlighting with char-fold-to-regexp. See #2124.
Add group for faces. See #2135.
swiper-avy
swiper-font-lock-exclude-p
swiper-query-replace
Fix for ivy--regex-ignore-order
.
Check for empty input. See #2066.
New Features
counsel-descbinds
Add M-o x counsel-descbinds-action-exec
. See #2024.
counsel-find-file
Press ` to get completion for bookmarks. This allows you to efficiently jump between recent directories. See #1956, #1958.
Press $ to get completion for your environment variables that are directories. See #1932, #1937.
New action: M-o c counsel-find-file-copy
. See #1955.
New var counsel-up-directory-level
that customizes C-DEL. See #1096.
New var counsel-find-file-extern-extensions
. Allows to press RET instead of M-o x for
selected file types, for which it doesn't make sense to be opened in Emacs.
When on a remote, // will cd to the remote root, instead of the local root. If you want to go to the local root, use / C-j. See #1487.
When on a remote, ~ will cd to the remote home, instead of the local home. If you want to
go to the local home, use / C-j ~. You can also try `
.
New binding when completing file names C-M-y ivy-insert-current-full
that obsoletes
counsel-yank-directory
. See #2092.
You can now use RET or C-m (in place of C-M-j) to create a directory, even if it matches an existing file.
counsel-git-grep
New variable counsel-git-grep-cmd-function
. Customize how git-grep is called based on
input.
counsel-git-log
counsel-grep
Add counsel-grep-history
. See #1914.
counsel-grep-use-swiper-p
When this function returns non-nil, counsel-grep-or-swiper
will call swiper
, else
counsel-grep-or-swiper
. See #1908.
counsel-locate
Automatically call updatedb
when your home folder is encrypted.
Use counsel-locate-db-path
to customize.
counsel-mark-ring
counsel-M-x
Optionally expand aliases. For example, if rb
is aliased to revert-buffer, and bound
to C-c r, counsel-M-x
will show: rb (revert-buffer) (C-c r)
.
Customize with counsel-alias-expand
, enabled by default.
See #1904.
counsel-rg
Dynamically handle look-arounds. See #1935.
Anchor pcre lookarounds to bol. See #1976, #1979.
Add an example of inclusion patterns to the doc.
Press C-x C-d calls counsel-cd
that allows you to change the current directory.
Add dynamic case folding. Make sure counsel-ag-base-command
or
counsel-rg-base-command
does not include "-i": it will be added automatically based on
your input and ivy-case-fold-search
. See #1869.
counsel-set-variable
Better annotations for options. If the option is e.g.:
(const :tag "Dotfiles and Lockfiles" "\\(?:\\`\\|[/\\]\\)\\(?:[#.]\\)")
then display:
Dotfiles and Lockfiles: \(?:\`\|[/\]\)\(?:[#.]\)
instead of:
\\(?:\\`\\|[/\\]\\)\\(?:[#.]\\)
If the option's value is nil, but a :tag
is present, display the option.
ivy-avy
Allow to scroll with C-v and M-v.
ivy-dispatching-done-hydra
New variable ivy-dispatching-done-hydra-exit-keys
. In case you bind
ivy-dispatching-done-hydra
to a custom key.
ivy-read
Allow to mark/unmark candidates with m, u, DEL, t. The bindings are similar to what dired provides. They are available in the C-o hydra. See #561.
Add :multi-action
argument. If multiple candidates are marked and this argument is
present, call it with the whole list of marked candidates, instead of calling :action
in
turn for each marked candidate. See #561, #2068.
ivy-inhibit-action
can be a function. This allows you to effectively override the
:action
argument to ivy-read
.
New var ivy-dispatching-done-idle
can delay the hint by a specified amount of seconds.
:update-fn
argument can now be 'auto
. This will call :action
each time the current
candidate changes.
New var ivy-format-functions-alist
that obsoletes ivy-format-function
. See #2083,
#2084, #2130.
New var ivy-display-functions-alist
that obsoletes ivy-display-function
. See #2089.
Add ability to resume dynamic collections. See #1095, #2112.
ivy–regex
Match initial dot in the input as a literal dot. This brings much more usability, e.g. enter ".org" to switch between Org-mode files, ".el" for Elisp etc.
ivy-reverse-i-search
New binding C-k ivy-reverse-i-search-kill
. Remove elements from history.
ivy-sort-matches-functions-alist
Sort shorter matches first for ivy-completion-in-region
.
ivy-switch-buffer
swiper
New variable swiper-use-visual-line-p
. Configure to prevent swiper
from becoming
slow in huge buffers where visual-line-mode is enabled.
Add preview overlays. See #1948.
swiper-query-replace
Use query-replace-compile-replacement to allow using Elisp in replacements. Simply use M-i to insert and edit the suggested replacement. See #2096.
For example, suppose in swiper.el, we want to rename:
(defTYPE swiper- to (defTYPE ivy
where TYPE is (group, face, fun, var …).
swiper-isearch
for(def\sw+ swiper
- M-q to replace and TAB to get:
\,(concat \1 " " \2)
- Modify it to
\,(concat \1 " ivy")
New Commands
counsel-compile
counsel-minor
counsel-register
Completion for registers: buffer positions, text, rectangles, window configs, frame configs, macros etc. See #2056.
counsel-switch-buffer
counsel-switch-buffer-other-window
swiper-all-thing-at-point
Start swiper-all
with symbol-at-point as input. See #2106.
swiper-isearch
A faster version of swiper
that's not line-based:
- Much faster startup
- When there are many matches on the same line, you can select each on individually
See #1931, #2014, #2018, #2029, #2031, #2034, #2039, #2058, #2069, #2119, #2146, #2151.
New variable swiper-isearch-highlight-delay
. Used to delay matches that are just one
character by 0.2s. Usually in that time frame a second key will be added to the input.
Obey search-default-mode. See #622, #2095.
swiper-isearch-thing-at-point
Start swiper-isearch
with symbol-at-point as input. See #2025, #2029.
swiper-isearch-toggle
A two-way toggle between swiper
and isearch-mode. See #2061, #2065.
swiper-thing-at-point
Start swiper
with symbol-at-point as input. See #2027.
swiper-backward
isearch-backward with an overview. See #1172, #2132.
counsel-grep-or-swiper-backward
See #2132.
swiper-isearch-backward
See #2125.
0.13.0
Fixes
counsel–async-last-command
New variable. Store the last command ran by counsel--async-command
.
counsel–async-last-error-string
New variable. If a command that relies on counsel--async-command
returns non-0, store
the output here. See #2160.
counsel-cd
Fix for counsel-ag
. See #2261.
counsel-compile
Delete duplicates. Favor project root over default-directory. See #2253.
counsel-compile-env-pattern
Fix regex typo. See #2193.
counsel-file-jump
Use temp buffer instead of split-string. See #2120.
Make counsel--find-return-list
work with or without the "./" prefix. See #2196.
counsel-git-grep-action
Check the result of re-search-forward. See #2209.
counsel-imenu
counsel-locate-cmd-es
Encode the command to local codepage. See #2278.
counsel-mark-ring
counsel-M-x
Respect counsel-describe-function-function
. See #2251.
counsel–py-action
Don't auto-insert parens. See #2229.
counsel-rg-base-command
Documentation
ivy.info
is not installed from GNU ELPA. See #697.
Fix typo. See #2170.
Fix ivy-read
docstring. See #2201.
Add full text of licences. See #2206.
Document the marking feature. See #2214.
Update GFDL licence. See #2187.
Ivy now requires at least Emacs-24.5 (released on 2015-04-10). Up from Emacs-24.1 (released 2012-06-10).
ivy-completion-in-region
Add workaround for package-menu-filter
. See #2244.
ivy–directory-done
Handle / C-j on remote. See #2205.
ivy-dispatching-done-hydra
Fix for ivy-resume
. Modify the action list non-desctructively. See #2195.
ivy–done
Check if given a string. See #2200.
ivy-immediate-done
Add copy-sequence to fix read-directory-name. See #1170, #2149, #2165.
Fix for when C-j changed cwd. See #2165.
Fix parent dirs for read-directory-name. See #2165, #2198.
ivy–magic-file-slash
Make less aggressive. Check that the prompt is not selected before performing the ivy-magic-slash-non-match-cd-selected action. See #2240.
ivy-occur
Set up for next-error. See #1354, #2257.
ivy-occur-revert-buffer
Don't error if the swiper
buffer was killed.
ivy-overlay-show-after
Check window height better. See #2161.
ivy-partial
ivy-resume
Restore use-ignore setting. See #2179.
ivy-yank-word
Handle case fold. See #2194.
swiper
Fix overlay faces using ivy--regex-ignore-order
. See #2162.
Fix symbol bounds with char-fold-to-regexp. See #2177.
swiper-isearch
swiper-isearch-action
Make ivy-previous-line-or-history
work. See #2158.
swiper-occur
Fix for wgrep
. See #2156.
swiper-query-replace
For for "^$" search term. See #2232.
swiper-recenter-top-bottom
Now works for swiper-isearch
.
swiper-thing-at-point
Fix for swiper-isearch
. See #2157.
New Features
counsel-dired
Filter to directories only. See #2275.
counsel-dired-jump-args
The variable is now a list. See #2120.
counsel-file-jump-args
The variable is now a list. See #2120.
counsel-find-file
Use ~~
to move to the local home directory from remote. Using / RET ~
is still an option,
but more cumbersome. This also works for /sudo::
. See #2276.
Use file-name-at-point-functions. See #1446, #2181, #2184.
Use dired-current-directory if in dired. See #2274.
Bind M-o R to find-file-read-only. See #2236.
counsel-find-file-mkdir-action
Make parents too. See #2178.
counsel-git-grep
counsel-M-x
counsel-package
Refresh contents automatically.
counsel-rg
Ivy will add "-i" appropriately, based on ivy-case-fold-search-default
.
You should remove the "-S" flag from counsel-rg-base-command
if you customized it.
When in dired, operate on marked files. This also applies to ivy-occur buffers of
counsel-find-file
and counsel-git
.
counsel-switch-buffer
Add actions. See #2233.
ivy-configure
New function to configure many things at once. Example:
(ivy-configure 'counsel-find-file :occur #'counsel-find-file-occur :display-transformer-fn #'ivy-read-file-transformer)
Instead of configuring many alists separately using the :caller
key of ivy-read
,
configure everything together.
ivy-ffap-url-functions
Add vc-git-log-view-mode.
ivy-partial
Obey completion-cycle-threshold. See #2225.
ivy-partial-or-done
Work with completion-cycle-threshold. See #2225. If you set this to an integer, and the amount of candidates is less than that number, pressing TAB will cycle to the next candidate.
ivy-pre-prompt-function
When non-nil, add strings before the ivy-read
prompt. See #2185.
ivy-read
New API for asynchronous calls. See #2263.
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-read-action-function
New defcustom that allows you to read the action via: key, or Ivy, or Hydra. See #2176.
ivy-restrict-to-matches
Work for dynamic collection. See #2168.
ivy-update-fns-alist
ivy-use-virtual-buffers
swiper-goto-start-of-match
Also works for counsel-grep
and counsel-git-grep
. See #2209.
swiper-isearch
Bind M-o w to copy the current line.
New Commands
counsel-buffer-or-recentf
Lists buffers visiting files (highlighted) then the recentf file list. See #2182.
counsel-fonts
Show a list of all supported font families for a particular frame. See #2220.
counsel-google
Asynchronously query the Google predictive search API.
counsel-major
Switch major-mode. See #378.
counsel-slime-repl-history
Browse Slime REPL history. See #2234.