Not all windows. See #117.
See #118.
See #50.
See #145.
See #144.
See #145.
“/ssh:foo” should not be cut off See #145.
See #155.
See #157.
See #150.
See #153.
See #151.
See #160.
See #171.
See #176.
When in Info-mode
, press 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.
See #134.
To enable fuzzy matching, set your ivy-re-builders-alist
accordingly:
(setq ivy-re-builders-alist
'((t . ivy--regex-fuzzy)))
See #136.
See also #142 for toggling fuzzy matching with C-o m
.
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.
To have this feature, use something like this:
(setq ivy-count-format "(%d/%d) ")
See #167.
You can also set this to “”, if you don’t want any count, see #188.
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.
Press C-,
to look up the symbol in info, instead of the default
describe action.
See #121.
See #126.
See #129.
See #135.
You can customize ivy-switch-buffer-map
.
See #164.
Add a kill-buffer
action, and switch-to-buffer-other-window
action.
Make it fully async: the process git grep
will be killed and
restarted on new input. This results in almost no keyboard delay.
Having own history variable allows to get more use of M-p
, M-n
and C-r
.
This allows to make use of C-M-n
and C-M-p
.
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.
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.
Customize ivy-initial-inputs-alist
for this.
See #140.
Pass the collection function as the second var instead.
Execute the current action for the current candidate without exiting the minibuffer. Bound toC-M-m
or M-RET
or C-o g
.
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.
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.
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.
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.
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.
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
.
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.
Forward to
load-theme
with Ivy completion. Allows to rapidly try themes (e.g. with C-M-n
).
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.
Control Rhythmbox from Emacs.
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
Forward to
org-set-tags
with Ivy completion.
Selecting any tag each time will toggle it on/off. The current list of selected tags will be displayed in the prompt.
Forward to
org-agenda-set-tags
with Ivy completion.
See #177.
Interactively
ag
using Ivy completion.
Use
recoll
with Ivy completion.
See Using Recoll desktop search database with Emacs.
Install recoll with sudo apt-get install recoll
.
Start
swiper
from the current isearch
input.
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.
See #195.
See #198.
See #198 and #161 and #220.
See #237, #229 and #77.
Allows
ivy-read
to return a propertized string.
Use
counsel-delete-process
as :unwind
.
See #245.
See #266.
See #245.
See #270.
When completing file names, expand the file name properly. See #275.
See #278.
So now it’s possible to e.g.
counsel-describe-function
-> M-o d
->
ivy-resume
-> M-o o
-> ivy-resume
-> M-o i
.
See #290.
See #295.
The syntax for whitespace, separators etc. is different for modes. See #298.
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 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
.
See #268.
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.
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.
C-M-n
and C-M-p
will no longer push mark and annoy with messages.
See #302.
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.
The 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.
See #240.
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.
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)))
Since all-completions
also works for hash tables, no reason not to support them.
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.
See #253.
The mode of abbreviation for virtual buffer names.
Used to override case-fold-search
. See #259.
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.
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 ivy-call
.
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.
Adds fancy highlighting to the minibuffer. See #212, #217, .
See #214.
See #233.
See counsel-locate-options
.
The current setting is:
(setq counsel-locate-options '("-i" "--regex"))
Use open
instead of xdg-open
. Modify counsel-locate-options
for
OSX, since there locate
doesn’t support --regex
.
See #194.
See #289.
See #200.
Use M-o d
to jump to definition.
See #287.
See #283.
Selecting items after //
now works properly.
Remember to use M-i
to insert the current candidate into the
minibuffer.
See #244.
Using C-c C-o
(ivy-occur
) while in counsel-git-grep
will produce
a wgrep
-compatible buffer.
This means that the " | head -n 200"
speed-up isn’t used and full
candidates are returned.
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)
When the symbol is both bound and fbound, prefer the fbound one,
unless the :caller
is counsel-describe-variable
.
Support alternative initial directory which helps other packages call this function with their unique starting directory.
Using the “–vimgrep” argument improves things.
Bound toC-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.
Bound to
M-w
.
When the region is active, call kill-ring-save
. Otherwise, store
all selected candidates to the kill ring.
Bound to
C-M-o
.
This is a non-exiting version of M-o
(ivy-dispatching-done
).
Bound to
C-M-a
. Select the current action. Don’t call it yet.
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.
Open multiple cursors at all selected candidates.
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.
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.
Bound to
M-q
. Perform query-replace
on all matches in all buffers.
Complete Python symbols using Jedi.
Complete Common Lisp symbols using SLIME.
Give completion for inserting from the kill ring. See
counsel-yank-pop-truncate
defcustom and #218.
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
.
HTML documentation is available at http://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.
Make it so e.g. C-h f C-h v C-g
goes back to the describe-function
selection.
In some cases, read-from-minibuffer
will return the whole minibuffer
contents (i.e. all available candidates). Return ivy--current
instead.
See #340.
See #352.
See #337.
See #375.
With this commit, Ivy works on emacs-24.2. See #415.
See #454.
See #466.
See #475.
See #483.
This way, next-error
etc will work properly.
See #339.
See #380.
See #316.
See #318.
See #344.
See #393.
Even if state
is invalid.
See #207.
See #323.
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.
See #377.
See #341.
When there’s only one candidate, call the action immediately.
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 case-fold-search
.
See #402.
See #469.
See #349.
See #410.
“\_<” 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.
Repeated pulses within a short time span resulted in horrible window flickering.
See abo-abo/avy#140.
Allow to exit with no candidates.
See #314.
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.
See #370.
See #89.
Allows to search better in modes for shell interaction.
Add bongo-library-mode, bongo-playlist-mode, sauron-mode.
See #19.
See #400.
See #481.
See #342.
See #394.
Use with-ivy-window
, so that each new file chosen with e.g. C-M-n
is
selected in the same window.
See #403.
See #324.
See #207.
When given :dynamic-collection
, assume the collection function only
needs one argument - the string input.
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.
Stack recentf
on top of counsel-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.
(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 in ivy-read
via
ivy--reset-state
. It takes no args and returns a list of strings,
possibly empty.
Bind C-h m
to ivy-help
.
ivy-help-file
is a new defvar pointing to the ivy-help.org file.
Bind D
in hydra-ivy
to go to hydra’s definition.
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.
See #331.
Allows to customize
ivy-occur
per-command.
(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
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
.
The overlays will be more responsive now.
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.
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.
New defcustom group. See #389.
New variable. Configure when
flx
is used.
See #207.
New variable. See #363.
New defcustom. See #367.
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.
New API function.
Now used by switch-to-buffer
and read-file-name
.
See #399.
New defcustom similar to
ido-ignore-buffers
.
New defcustom.
See #451.
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).
New defcustom
See #477.
To replace a symbol with a similar symbol,
- Press
C-s M-n
forswiper
and select the symbol at point as input. - Press
M-q
forswiper-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.
New variable for major modes that misbehave with
font-lock-ensure
.
See #346.
See #401.
A minor-mode that remaps built-in functions that have counsel replacements available.
See #414.
See #441.
See #336.
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.
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.
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.
See #430.
See #458.
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.
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.
New defcustom that replaces counsel-locate-options
.
See #385.
New function. See #390.
New function. See #426.
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.
Display hex codes in left column.
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.
See #429.
See #462.
New defcustom.
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.
New defcustom
Just like swiper
.
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.
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.
Bound to M-o h
by default.
See #452.
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
.
Jump to a buffer position indexed by imenu.
Show a list of all defined keys, and their definitions. Describe the selected candidate. See #332.
Offer completion for
process-list
The default action deletes the selected process. An extra action allows to switch to the process buffer.
Remap
switch-to-buffer-other-window
to ivy-switch-buffer-other-window
for ivy-mode
.
See #361.
Search through all available git stashes.
See #374.
Call the
git log --grep
shell command and search through the output.
Grep for a string in the current directory using pt.
See #434.
Launch a Linux desktop application, similar to Alt-<F2>.
See #446.
Ivy completion for
ace-link
.
Browse Eshell history.
See #459.
Browse shell history.
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.
Fix color parsing in terminal. See #541 and #543.
Check for an additional 141 return code.
Use
cdr
for action. See #835.
See #669.
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.
See #518.
See #586.
See #692.
See #744.
See #780.
See #782.
See #792.
See #537.
To open externally.
Quote
:preselect
.
Don’t grep on compressed files. See #536.
See #558.
See #631.
Fix doc, see #721. Add preselect, see #722.
See #604.
See #896.
Add noconfirm flag in
counsel-load-theme-action
.
See #605.
See #564.
Perform in the minibuffer. See #890.
Add
shell-quote-argument
. See #713.
No longer depends on
helm-rhythmbox
.
Fix candidates not showing sometimes.
See #577.
See #601.
See #714.
See #833.
Recompute index after filter.
See #491.
Improve. See #843.
Fix for
ivy-display-style
nil. See #828.
Fix
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.
Set
default-directory
, see #717, #760, #779, #810.
Recursive logic, see #924, #937.
Fix double insert bug. Fix common length bug. See #528. Remove
:require-match
, see #907.
Remove string properties, see #517. Remove
with-ivy-window
, see #928.
Add correction. See #737.
Define with
defconst
, see #938.
See #464, #512.
Update docstring, see #525.
See #566.
Instead of assigning C-v
/ M-v
so page up/down works.
See #797, #798.
The ultimate solution to have PgUp and PgDown and whatever else was
mapped to scroll-up-command
bound in ivy-minibuffer-map
. While
still having the standard C-v
and M-v
bindings.
Pass the whole cons cell to action, see #634.
Fix for
:dynamic-collection
.
See #946.
See #533.
See #804.
Use a lighter color for dark themes, see #646.
The original
default-directory
will be restored, see #591.
Improve. See #870.
Obey
ivy-ignore-buffers
. See #745.
See #738.
See #764, #402.
See #565.
See #613.
Example:
(setq ivy-re-builders-alist '((swiper . ivy--regex-fuzzy) (t . ivy--regex-plus)))
Require
avy
, see #593.
Add
forth-mode
, see #526.
Add forth-block-mode
, see #527.
Add bookmark-bmenu-mode
.
Add nix-mode
, see #879.
Add circe-mode
, see #900, #901.
Fix regression, See #673. Don’t use virtual buffers, See #705.
See #576.
See #774.
New hook for counsel-ag/grep/pt. See #800, #751.
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.
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.
Press M-o r
to find the current file as root.
See #948.
See #590.
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
See #700.
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.
See #876.
The initial value for counsel-git-grep-cmd
.
Allows to customize the command, see #652.
Customize the search path.
See #873.
Substitutes info-lookup-symbol
, see #493.
Press C-r
while inside the minibuffer during eval-expression
or
shell-command
to get completion for history.
Add
initial-input
arg. See #757.
See #662.
See #868.
Allows to customize the separator. See #660.
ivy-display-functions-alist
- 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-next-action
and ivy-prev-action
wrap around.
This is a convenience extension to the existing ivy-set-actions
.
See #470.
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.
Customize the highlighters. See #691, #654, #827.
New defcustom. Decide if ~
or ~/
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.
See #909.
New defcustom. See #892.
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)
See #720.
See #789.
See #904.
By default, M-o j
will select the file or buffer in other window, for
both ivy-switch-buffer
and counsel-find-file
.
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)
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)))))))
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.
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.
This allows for a lot of simplification, e.g. use insert
instead of
(lambda (x) (with-ivy-window (insert x)))
.
See #639.
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.
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)))
See swiper-include-line-number-in-search
and #562.
Relevant for high settings of scroll-conservatively
.
See #643.
If you’ve set the regex builder to fuzzy (non-default), you’ll get a highlight quality on par with the default one. See #651, #653.
See #622.
See #887.
See #888.
See #947.
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.
See #932.
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.
See #623.
See #787.
See #819.
See #880.
Completion for
bookmark-jump
.
Can delete and rename bookmarks, see #758.
See #815, #921.
See #815.
See #826.
Picks up company’s candidates and inserts the result into the buffer. See #331, #547.
See #585, #703.
Like,
counsel-file-jump
, but for directories.
Completion for
dpkg -l
.
See #815.
Jump to a file from a list of all files in the current directory, see #609, #610.
A helpful and unsurprising alternative to using
C-.
with
counsel-load-library
.
See #794, #801.
Call a head of the current/last hydra by name. See #696.
Inline C++ completion using Irony.
See #834.
See #825.
Completion for outlines in the current buffer.
Manage packages. Allows installing, deleting, describing etc. See #869, #872.
Renamed from
ivy-recentf
, see #624.
Added actions in #701:
j
forfind-file-other-window
x
forcounsel-find-file-extern
Remove text properties, see #770.
Grep for a string in the current directory using
rg
.
Use counsel-rg-base-command
to customize.
See #784, #785, #795, #796.
Call the
rpm
shell 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.
When counsel-mode
is on, M-! C-r
will call
counsel-shell-command-history
.
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.
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.