Not all windows. See #117.
swiper-avy should use only the current window
See fix wrap-around for #118.
swiper-avy should do nothing for empty input
ivy-alt-done should require TRAMP if necessary
swiper-query-replace shouldn’t miss the first occurrence
swiper should not deactivate mark
ivy-mode should not switch to TRAMP for certain input
“/ssh:foo” should not be cut off
counsel-find-file should work better with TRAMP
counsel-find-file supports Windows drive letters
counsel-file-file should work better with files that contain “~”
counsel-M-x should respect
counsel-git-grep should position better on exit
ivy-mode should re-scale text to minibuffer height
counsel-unicode-char should use action-style call
ivy-read should allow % in prompt string
ivy-call should execute in proper window
Open an Info file on the file system
g and select either “(./)” or “(../)” to
switch to file name completion. That file will be opened with Info.
If you have
minibuffer-depth-indication-mode on, the minibuffer
prompt will indicate the current depth.
Add fuzzy matching function
To enable fuzzy matching, set your
(setq ivy-re-builders-alist '((t . ivy--regex-fuzzy)))
See also #142 for toggling fuzzy matching with
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”.
Allow to see the candidate index a la
To have this feature, use something like this:
(setq ivy-count-format "(%d/%d) ")
You can also set this to “”, if you don’t want any count, see #188.
Allow to add additional exit points for any command
(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")))
M-o kto kill a buffer
M-o jto 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
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
Deal better with invisible buffers
Add custom keymap
You can customize
Add extra actions
kill-buffer action, and
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
Own history variable
Having own history variable allows to get more use of
Switch to action-style call
This allows to make use of
Add extra actions
In addition to the default action of opening a file add:
C-o to access these actions.
Add own history
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
If you’d like to customize this, pass your own matcher.
counsel-git-grep-matcher for an example.
Allow to customize the initial input for all commands
ivy-initial-inputs-alist for this.
ivy-sort-functions-alist should also examine
:dynamic-collection is now a boolean
Pass the collection function as the second var instead.
Execute the current action for the current candidate without exiting
the minibuffer. Bound to
find-filewith Ivy completion.
ivy-next-line-and-call as well as
ivy-resume should work for this command.
counsel-find-file-ignore-regexp allows to ignore
certain files, like dot files. Input a leading dot to see all files.
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.
counsel-find-file-map allows to customize the
minibuffer key bindings for this command.
(global-set-key (kbd "C-x C-f") 'counsel-find-file)
You can peek at files with
See #152 about
M-i switching directories when necessary.
Find a file on
Note that if your set
merged into candidates list for
ivy-switch-buffer. But if you want
it separately, you can use this command.
Add word at point to minibuffer input.
This is similar to what
C-w does for
isearch. However it’s bound
M-j instead of
C-w is bound to
kill-region - a
execute-extended-commandwith 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.
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.
C-oto toggle the Hydra for Ivy. It gives access to shorter bindings and many customizable options.
C-o > to grow the minibuffer.
C-o < to shrink the minibuffer.
Toggle executing the current action each time a new candidate is selected.
This command is bound to
To explain how this is useful:
C-M-m C-M-f C-M-f C-M-f is equivalent to
Inserts the current candidate into the minibuffer.
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.
load-themewith Ivy completion. Allows to rapidly try themes (e.g. with
Allow to recursively match history with
I like this command from bash shell. The usual way to search through
history is with
open a recursive completion session with the current history as the
Control Rhythmbox from Emacs.
Select an action for the current candidate and execute it. Bound to
Some commands that support
org-set-tagswith Ivy completion.
Selecting any tag each time will toggle it on/off. The current list of selected tags will be displayed in the prompt.
org-agenda-set-tagswith Ivy completion. See #177.
agusing Ivy completion.
recollwith Ivy completion. See Using Recoll desktop search database with Emacs.
Install recoll with
sudo apt-get install recoll.
swiperfrom the current
Use this command to exit the minibuffer choosing not the current
candidate, but the current text. Bound to
Fix :dynamic-collection not being sorted
See When :initial-input contains a plus, escape it#195.
See Set line-spacing to 0 in the minibuffer#198.
See Enlarge the minibuffer window if the candidate list doesn’t fit#198 and #161 and #220.
See Fix minibuffer collapsing to one line#237, #229 and #77.
Allows Use minibuffer-allow-text-properties
ivy-readto return a propertized string.
C-g out of a long-running async process
See Don’t regexp-quote :preselect#245.
See Fix ivy-partial for fuzzy completion#266.
See ivy-resume should pass :caller#245.
See Fix the regression in perfect match logic#270.
Fix pasting file paths on Windows
C-j should no stop completion for a pasted file path
When completing file names, expand the file name properly.
C-M-j should use
See Use a specific blend method for dark themes#278.
Fix one-off bug in
So now it’s possible to e.g.
M-o shouldn’t set the action permanently
See Fix swiper preselect issue with similar or identical lines#290.
See Make ivy-completing-read handle history as cons#295.
The syntax for whitespace, separators etc. is different for modes. See Perform string-match in the original buffer#298.
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.
Add support for
Make compatible with
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,
visual-line-mode is slow.
At each start of
swiper, the face at point will be stored.
Use this command to toggle matching only the candidates with that face.
push-mark only if exited the minibuffer
C-M-p will no longer push mark and annoy with messages.
ivy-resume should restore the buffer for
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:
field text property is now removed before inserting text into
the minibuffer. This fixes the
swiper problems with
twittering-mode. See #310.
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
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
window popup would move the window focus, but this change moves it
back to the minibuffer.
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
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
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
How to use:
(require 'flx)should succeed.
ivy-re-builders-alistappropriately to use
(setq ivy-re-builders-alist '((t . ivy--regex-fuzzy)))
Support hash tables
all-completions also works for hash tables, no reason not to support them.
Improve documentation of
Now possible to set it with Customize.
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.
The mode of abbreviation for virtual buffer names.
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
counsel-ag (when in a very large directory)
ivy-extra-directories to defcustom
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
This new face is blank by default, but you can use e.g.:
(custom-set-faces '(ivy-modified-buffer ((t (:background "#ff7777")))))
Store the old
ivy-last in case
ivy-read is called while inside the
minibuffer. Restore it after
Allow user-specified matched candidate sorting
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.
M-o r rename the buffer instead of switching.
Allow customizing locate options
The current setting is:
(setq counsel-locate-options '("-i" "--regex"))
open instead of
OSX, since there
locate doesn’t support
Use single quotes for the regex
Add initial-input argument
Now works in agenda
Add own history
Add “definition” action
M-o d to jump to definition.
current-prefix-arg in the prompt
Input ‘/sudo::’ goes to current directory instead of root’s home
Fix directory validity check
Improve TRAMP support
Selecting items after
// now works properly.
Use prefix arg to specify the shell command.
Remember to use
M-i to insert the current candidate into the
C-c C-o (
ivy-occur) while in
counsel-git-grep will produce
ivy-occur gives full candidates
This means that the =” | head -n 200”= speed-up isn’t used and full candidates are returned.
Allow to jump back with pop-tag-mark
will change the current buffer. The buffer and point can be restored
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,
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.
C-c C-o. Store the current completion session to its own buffer. You can have an unlimited amount of these buffers.
Bound to ~C-‘~.
Speeds up selecting a candidate that’s currently visible in the minibuffer.
When the region is active, call
kill-ring-save. Otherwise, store
all selected candidates to the kill ring.
This is a non-exiting version of
C-M-a. Select the current action. Don’t call it yet.
swiperin multiple buffers. See #182.
Basic usage tips for selecting multiple buffers:
ivy-call) to add or remove one more buffer without exiting.
ivy-done) to add one last buffer.
- Or use
ivy-immediate-done) to finish without adding more buffers.
ivy-next-line-and-call) to add a lot of buffers at once.
Open multiple cursors at all selected candidates.
New command to launch
swiperfor all open file buffers. Note that this can be excruciatingly slow if you don’t clean up your buffer list often.
This is essentially
swiperfor huge files. It’s not as smooth as
swiperfor small files, but has a faster startup and faster matching for files that measure in megabytes.
query-replaceon all matches in all buffers.
Complete Python symbols using Jedi.
Complete Common Lisp symbols using SLIME.
Give completion for inserting from the kill ring.
counsel-yank-pop-truncatedefcustom and #218.
Due to popular demand, Package rename
swiper-0.7.0is succeeded by
ivy-0.8.0in GNU ELPA. The contents of the package don’t change, only the name. Make sure to remove the
~/.emacs.d/elpa/swiper-0.7.0directory if you have it and
HTML documentation is available at Documentationhttp://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.
Fix recursive minibuffer exit with
Make it so e.g.
C-h f C-h v C-g goes back to the
Ensure the return result
In some cases,
read-from-minibuffer will return the whole minibuffer
contents (i.e. all available candidates). Return
Properly support matching ignoring order
Insert intermediate candidates during async completions
ivy-last to empty state
Fix extra actions for
Support a list of symbols as collection
defvar-local unless defined
With this commit, Ivy works on emacs-24.2. See #415.
M-o not modify the action
Make sure user keybindings are respected
read-file-name with a specified dir
Don’t highlight the match in the file part
Add a few tests for alists
next-error etc will work properly.
Fix for small delta
completing-read-default for tmm
Recognize ! at the beginning of the str
Prettify a bit
\\(?...\) a group
Always return a valid window
state is invalid.
Fix due to recursive update
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
Don’t deactivate region
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.
It’s convenient to have it the same value as
Give enough minibuffer space
Allow to customize the action hint formatter
Fix for nil value
Don’t fall back to
No “\_<” for dynamic-collection
“\_<” regex is Emacs-specific and should only be done if
:dynamic-collection is nil. It is nil for
repositories < 20000 lines, but non-nil for larger ones.
Pulse no longer
Repeated pulses within a short time span resulted in horrible window flickering.
Add a guard against null
C-g cancel gracefully
Allow to exit with no candidates.
Improve for multiple occurrences on one line
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.
Always remove ‘(field) text property
Allows to search better in modes for shell interaction.
Add bongo-library-mode, bongo-playlist-mode, sauron-mode.
Don’t fail when font-lock is off
Add check for
Fix issue with
Re-display when no cands
Recognize error codes other than 1
Fix window selection.
with-ivy-window, so that each new file chosen with e.g.
selected in the same window.
See compilation warnings#324.
flx for highlighting fuzzy matches
Simplify the signature for
:dynamic-collection, assume the collection function only
needs one argument - the string input.
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
recentf on top of
(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)))
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)))
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.
my-extra-source gets called once in
ivy--reset-state. It takes no args and returns a list of strings,
Improve documentation UI
C-h m to
ivy-help-file is a new defvar pointing to the ivy-help.org file.
hydra-ivy to go to hydra’s definition.
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
M-n for =’read-file-name-internal=
Allows to customize
Add custom occur for
New commands on
(ivy-occur-toggle-calling): New command bound to
(ivy-occur-next-line): New command bound to
(ivy-occur-previous-line): New command bound to
ivy-occur much more convenient, instead of
cjjj. Especially good for commands that change the contents of the
other window, like
C-o ualso works.
Does what e.g.
revert-buffer does for Help buffers.
Has special handling for
counsel-grep: will run the shell command once more and reflect the
updates in files.
Improve the feedback for
The overlays will be more responsive now.
this-command to be a key
(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
t to affect all commands
(ivy-set-actions t '(("i" insert "insert")))
Now an “insert” action will be available for all
New defcustom group.
New variable. Configure when
flxis used. See #207.
New variable. See #363.
New defcustom. See #367.
When non nil, fix the height of the minibuffer during ivy completion
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
New API function.
Now used by
New defcustom similar to
Add virtual views
ivy-views variable stores pre-defined views. Allows to set a window
configuration with many buffers from
How to use: just set
ivy-views appropriately. An example value is
provided (but nulled, so that it’s empty initially).
To replace a symbol with a similar symbol,
swiperand select the symbol at point as input.
M-nto yank the symbol to replace.
- Edit the replacement and
Here step-3 was modified to yank e.g. “symbol” instead of “\_<symbol\_>” previously.
New variable for major modes that misbehave with
font-lock-ensure. See #346.
New auto-updates position
A minor-mode that remaps built-in functions that have counsel
Allow use of describe-prefix-bindings
Change tramp prompt from “Find File: ” to “user@host: ”
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.
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.
C-x C-f M-n key binding will work better with
find-file it will open a
dired buffer in addition to opening
Can un-ignore dotfiles with a leading dot input
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.
M-o f to
Correctly expand file name at point
Add display transformer
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.
C-c C-m to
The initial command always runs on all files.
To run only on *.el files,
C-c C-m followed by
To run on *.c and *.h files,
C-c C-m followed by
-- *.c *.h.
To switch to all files again,
C-c C-m and select the appropriate
New defcustom that replaces
New function. See #390.
New function. See #426.
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
ivy-height is temporarily bound to 5 during completion.
This way, the maximum minibuffer height should be 1+4*5=21 lines.
Display hex codes in left column.
Preselect the current song
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.
(setq counsel-ag-base-command "ag --nocolor --nogroup %s -- .")
Add dir prompt for
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.
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.
Add help action
M-o h by default.
Completion for the menu bar items. For example:
Set Default Font....
Thanks to completion, the latter stages of the chain would look like:
Jump to a buffer position indexed by imenu.
Show a list of all defined keys, and their definitions. Describe the
Offer completion for
The default action deletes the selected process. An extra action allows to switch to the process buffer.
Search through all available git stashes.
git log --grepshell command and search through the output.
Grep for a string in the current directory using pt.
Launch a Linux desktop application, similar to Alt-<F2>.
Ivy completion for
Browse Eshell history.
Browse shell history.
New command: automatically use
swiperfor smaller buffers and
counsel-grepfor larger buffers.
(setq counsel-grep-swiper-limit 300000)
By default, the splitting predicate is 300K bytes in a file.
Fix color parsing in terminal. See #541 and #543.
Check for an additional 141 return code.
cdrfor action. See #835.
Use sync on remote
Add missing parameter
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.
Check compat between preselect and initial-input
Prevent expand-file-name nil
Don’t crash if default-directory is nil
C-y a “/ssh:” file
M-n on issue works for newer magit version
Fix when initial input is a file name
file-name-directory returning nil
RET on no input
RET when file exists
Add a better error message.
To open externally.
Don’t grep on compressed files. See #536.
Force rescan if requested
Fix doc, see #721.
Add preselect, see #722.
Don’t quit on bad data
Check if dir exists
Add noconfirm flag in
Add w32 support to
Fix interaction with
Perform in the minibuffer. See #890.
shell-quote-argument. See #713.
No longer depends on
Fix candidates not showing sometimes.
Fixed typos in the doc
ivy-format-function to the doc
Added info on generating the doc
Added info on associating values
Update package names on ELPA/MELPA
Recompute index after filter.
Improve. See #843.
ivy-display-stylenil. See #828.
max-mini-window-height. See #732.
Scroll to first command. See #829.
Ensure it returns legal regexps. See #765.
Simplify. See #827.
Don’t modify recentfs or bookmarks. See #821.
default-directory, see #717, #760, #779, #810. Recursive logic, see #924, #937.
Fix double insert bug.
Fix common length bug. See #528.
:require-match, see #907.
Remove string properties, see #517.
with-ivy-window, see #928.
Add correction. See #737.
defconst, see #938.
See #464, #512.
ivy-hydra is now a separate package on MELPA
Update docstring, see #525.
The ultimate solution to have PgUp and PgDown and whatever else was
scroll-up-command bound in
still having the standard
Pass the whole cons cell to action, see #634.
:dynamic-collection. See #946.
Document all args
Use predicate when reading file names
Use a lighter color for dark themes, see #646.
default-directorywill be restored, see #591.
Improve. See #870.
Reset index to 0 on input
ivy-ignore-buffers. See #745.
See Recursive minibuffers with two emacsclients#738.
See shrink minibuffer after reading actions#764, #402.
Fix “foo!bar” syntax
(setq ivy-re-builders-alist '((swiper . ivy--regex-fuzzy) (t . ivy--regex-plus)))
avy, see #593.
forth-mode, see #526. Add
forth-block-mode, see #527. Add
nix-mode, see #879. Add
circe-mode, see #900, #901.
Fix regression, See #673.
Don’t use virtual buffers, See #705.
Prompt for extra args when using prefix arg
Support limiting in files
When non-nil and a directory is selected from
forward the choice to
counsel-find-file instead of opening a
buffer. See #813.
Add binding to jump to a bookmarked directory without quit
M-o b to set the current directory to one of the virtual
buffers’ directories. You continue to select a file from that directory.
M-o r to find the current file as root.
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
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
Reveal text hidden in outlines
Works with “Git for Windows” and native Emacs build
Fix for files with spaces in the name
Things go wrong when `ivy-text’ is changed from the original value.
ivy-text from the buffer name.
Quote the directory name. See #811.
The initial value for
Allows to customize the command, see #652.
Customize the search path.
Allow to find library with an action
info-lookup-symbol, see #493.
C-r while inside the minibuffer during
shell-command to get completion for history.
initial-inputarg. See #757.
Add leading zeros to the display
Support universal argument
Allows to customize the separator. See #660.
completion at point
- New defcustom, which decides how to display the candidates.
ivy-completion-in-region will use completion at point by default.
Set this to have
ivy-prev-action wrap around.
This is a convenience extension to the existing
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.
Add support for
multiple-cursors, see #547.
New defcustom. Decide if
~/ should cd home.
Allow to set the prompt using the
:caller as key.
An advanced override of the prompt string.
Extends the options for sorting file names. See #498.
Improves sorting customization. See #899.
:require-match for null
New defcustom. See #892.
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:
RET now switches to candidate window
read-only-mode is enabled
Make key binding for other window action consistent
M-o j will select the file or buffer in other window, for
Facilitate sorting of cons cells
(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
|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
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
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
cdr. Example: C function declaration and definition for tag
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.
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))).
Puts e.g. the
*scratch* buffer ahead of the
misc buffer if the input
is “sc”, since it’s almost like a prefix match.
Sort virtual buffers after open buffers
Allow to customize faces in
ivy-switch-buffer by the mode of each buffer.
(setq ivy-switch-buffer-faces-alist '((emacs-lisp-mode . swiper-match-face-1) (dired-mode . ivy-subdir) (org-mode . org-level-4)))
Add option for swiper line number to be searchable
swiper-include-line-number-in-search and #562.
Restore window position after using swiper.
Relevant for high settings of
Improve fuzzy highlight
Add compatibility with
evil search highlighting
New defcustom. When non-nil, swiper default action will go to the beginning of the match instead of on its end. This behavior is inspired by vim’s and evil’s way of searching.
swiper-avy works with more regexp builders
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
M-q for query-replace
Ignore TAGS buffers
Consider magit stash buffers
Can delete and rename bookmarks, see #758.
See #815, #921.
Picks up company’s candidates and inserts the result into the buffer.
See #331, #547.
See #585, #703.
counsel-file-jump, but for directories.
Jump to a file from a list of all files in the current directory, see #609, #610.
A helpful and unsurprising alternative to using
counsel-load-library. See #794, #801.
Call a head of the current/last hydra by name.
Inline C++ completion using Irony.
Completion for outlines in the current buffer.
Manage packages. Allows installing, deleting, describing etc.
See #869, #872.
ivy-recentf, see #624.
Added actions in #701:
Remove text properties, see #770.
Grep for a string in the current directory using
counsel-rg-base-commandto customize. See #784, #785, #795, #796.
rpmshell command. See #695.
Completion for semantic tags.
Completion for setting a variable to a value.
See #544, #546, #549, #550, #556.
Search through history in
shell-mode. See #689.
counsel-mode is on,
M-! C-r will call
ivy-push-viewto 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.
ivy-switch-bufferto select stored views.
ivy-pop-viewto delete a stored view that you don’t want any more.
ivy-sort-functions-alistto allow a list of sorting functions to apply to a collection. The car of this list is the current one.
ivy-rotate-sortthen 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)))
RET C-c C-s now switches from the default sorting to
C-c C-s again switches to
string-greaterp and so
Fix default ag command on Windows, see counsel-ag#1221.
Don’t break when search string begins with “-“, see counsel-ag-occur#1048.
Fix quoting, see #1240.
Various fixes, see counsel-company#969.
Fix regex, see counsel-descbinds#1089.
find-program, see #1181.
C-ywhen pasting a file path.
Fix magic slash regression, see #1027.
Don’t quote regex for
Fix completion of relative directories, see #1055.
Make sure foo/ directory goes before foo-bar/ directory, see #1315.
Use =xargs -d ‘\n’=, see counsel-find-file-occur#1323.
Fix error on 24.5, see counsel-git-grep#1107. Fix for Windows, see #1176.
Fix output with negative pattern, see counsel-git-grep-occur#1173.
Fix bug, see #1225.
Fix warning, see counsel-git-grep-recenter#1097.
Optimize text props, see counsel-git-grep-transformer#1264.
Ignore blank candidates, see counsel-git-log#1122.
Fix regex, see counsel-git-occur#1299.
Add “–”, see counsel-grep-base-command#1266.
Add trailing space to prompt, see counsel-imenu#1245.
Various fixes, see counsel-irony#1018.
Handle cygwin, see counsel-locate-action-extern#1314.
Don’t rebuild cache on every call, see counsel-M-x#1085. Add own history, see #1185.
Fix package removal, see counsel-package#970.
Handle defcustom with multiple entries, see counsel-set-variable#960.
Work around counsel-shell-history
ring-elements, see #1148.
Handle cons arg, see counsel-unquote-regex-parens#1322.
Various fixes, see ivy#997, #1327, #1334, #1336.
:preselect to collection, see #1017.
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.
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.
ivy-overlay-cleanup only when needed, see #1211.
Don’t require prompt to end in “: “, see #1207.
Fix “/sudo::” in current dir, see #1232.
Fix prefix issue, see #1244.
Update prompt even if there are no candidates. See #1183.
this-command for sorting, see #1294.
Delete action duplicates by key, see ivy-add-actions#1296.
Fix logic when scrolled, see ivy-avy#1004.
Exit silently, see #1073.
Select correct candidate when using display transformer, see #1255.
Add some entries, and tests. See ivy-completing-read-handlers-alist#1049.
Fix length bug, see ivy-completion-in-region#1251.
Fix sole match case, see #1252.
Fall back when there’s no space, see ivy-display-function-overlay#1136. Fall back when there’s no vertical space, see #1136. Check for point-min, see #1267. Fix for
Check if git is present, see ivy-ffap-url-functions#1216.
Fixup, see ivy-format-function-arrow#1004.
Fix entry for man, see ivy-initial-inputs-alist#1226.
Fix double ivy-occur
pop-to-bufferissue, see #1284.
Don’t fail if buffer was killed.
Fix regex passed to grep, see #1299.
setq-local, see #1318.
ivy--dirname-p, see #1317.
Fix interaction with case-folding, see ivy-partial#1019, #1021. Fix downcase for non-string, see #1024, #1036.
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 ivy-previous-line-or-history#1137.
Extend docstring, see ivy-re-builders-alist#1308.
with-output-to-string, see #1300.
Protect against swiper
match-endnot integerp. See #1188, #1192.
Turn off swiper–init
reveal-modefor the duration, see #1312.
Various mode additions. swiper-all-buffer-p
Add treemacs-mode, see swiper-font-lock-exclude#1212.
Add magit-popup-mode, see #1274.
Add adoc-mode, see #1275.
Add bbdb-mode, see #1276.
When an external program output is used, first check if the program is installed, see counsel#1076.
Configure async delay. See counsel-async-filter-update-time#1149.
New defcustom. See counsel-async-ignore-re#1122.
Highlight interactive functions, see counsel-describe-function#981, #982.
counsel-describe-function. Useful for https://github.com/Wilfred/helpful. See #1321.
Customize which symbol will be initial for counsel-describe-function-preselect
counsel-describe-function, see #1088, #1330.
Highlight custom variables, see counsel-describe-variable#980, #982.
completion-ignored-extensions, see #1092.
Allow to customize fzf work directory. counsel-fzf-dir-function
Add optional counsel-git
initial-input, see #1074.
New defcustom, see counsel-git-grep-skip-counting-lines#524, #1042.
New defcustom. See counsel-git-log-split-string-re#1122.
Don’t attempt to save readonly files, see counsel-grep-or-swiper#999.
Prevent opening an already opened file, see #1001.
Improve logic, see #1290.
More uniform interface, see #1313.
Allows to use counsel-imenu-map
C-lto recenter. See #1180.
Various improvements, see counsel-linux-app#897, #959.
M-o d to open the desktop file, see #897.
Sort by location, see counsel-mark-ring#1006.
counsel-faces, see #1259.
Limit results to 150 columns, see counsel-rg#988.
Never use color results, see #1060.
Search whole Git repository, not the current directory.
Show candidates in order, see counsel-unicode-char#1003.
ucs-names being a hash table in emacs-26, see #1223.
Make lazy, see #1204.
If the current directory is remote and it’s not possible to go up any further, make the remote prefix editable. See counsel-up-directory#1242, #1227.
Added to counsel-url-expand
counsel-url-expansions to be able to browse various links
C-x C-f M-n. See #1164.
Don’t restrict to 3 chars or more, see counsel-yank-pop#973.
M-o d to remove an item from the kill ring.
Ignore empty candidates, see #1043.
In any completion session:
w as global actions
M-o wto copy the current candidate to the kill ring.
M-o ito insert the current candidate into the buffer.
See Add CONTRIBUTING.org#1260, #1332.
Off by default. When on, and there’s only one candidate, use it automatically without a completion session. ivy-auto-select-single-candidate
Preselect last dir, see ivy-backward-delete-char#1257.
: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.
Quit with ivy-dispatching-done-hydra
C-g, see #922.
Break hint into columns, see #953.
Customize what ivy-magic-slash-non-match-action
/does when completing file names, see #998, #1009.
When completing file names, ivy-occur
counsel-cmd-to-diredis called, resulting in a Dired buffer.
read-only-mode, see #1273.
Add new argument ivy-read
def, see #1047, #1049, #1052, #1112.
Allow to quit with ivy-read-action
ESCfor better work with evil, see #952.
Bound to ivy-rotate-preferred-builders
C-o m. Customize with
ivy-preferred-re-builders. See #1093, #1094.
Compose faces better, see ivy-switch-buffer#992.
New defcustom. See ivy-truncate-lines#1110.
When non-nil, make the prompt line selectable like a candidate. ivy-use-selectable-prompt
ivy-alt-done on a selected prompt forwards to
ivy-immediate-done, thus exiting with the current user input instead
of the selected candidate.
Disable read-only for the duration, see swiper-query-replace#1273.
counsel-ag, but with ack. See #1075.
Completion for counsel-aproposapropos, see #1014.
Completion for counsel-file-registerfile registers, see #1057, #1066.
Completion for counsel-fzffzf. See #1151, #1263.
Completion for counsel-git-change-worktreegit-worktree. See #989, #1114, #1115.
Completion for counsel-git-checkoutgit-checkout. See #1187.
counsel-shell-command-history. See #1237.
Completion for counsel-org-captureorg-capture. See #1320.
Browse all attachments for the current Org file. counsel-org-file
Completion for Org headings. See counsel-org-goto#1005, #1008, #1011, #1012, #1013.
Completion for Org headings in all open buffers. See counsel-org-goto-all#1005.
Switch to a shell buffer, or create one. See counsel-switch-to-shell-buffer#990.
Bound to ivy-occur-delete-candidate
ivy-occur-mode. Allows a sort of a todo-list workflow.
Switch to one of the window views stored by ivy-switch-view
ivy-push-view. You can use it separately from
ivy-switch-buffernow. See #929, #1109.