31
votes
Ivy disable completion for a command in minibuffer
I think what you're looking for is C-M-j (ivy-immediate-done) in the mini buffer. This function is described as follows in the Ivy manual:
Exits with the current input instead of the current ...
25
votes
Accepted
Enable ivy fuzzy matching everywhere, except in swiper
I'd like to continue using fuzzy matching with Ivy except in swiper.
The variable that determines which "regexp builder", as Ivy refers to these functions, is used for which collection function is ...
16
votes
Accepted
how to ignore current selection from ivy when my typed text matches one
C-M-j (ivy-immediate-done) - exit with the current action, calling it on the current input instead of the current candidate. This is useful especially when creating new files or directories - often ...
12
votes
Accepted
How can I setup eshell to use ivy for tab completion?
This should work fine:
(define-key eshell-mode-map (kbd "<tab>") 'completion-at-point)
I don't know why the above isn't the default. But I use only shell-mode and term-mode anyway.
12
votes
Accepted
Display corresponding key binding of command during M-x completion
The command counsel-M-x does this for you:
(ivy) Global key bindings recommends you remap M-x (execute-extended-command) to counsel-M-x in order to avail of its increased Ivy-ness, e.g. via
(when (...
11
votes
Accepted
Code auto completion with ivy
What you want can be achieved by adding a new source to completion-at-point-functions. This isn't specific to ivy, but ivy makes use of it:
(defun dabbrev-complation-at-point ()
(dabbrev--reset-...
10
votes
Accepted
Swiper get last search term
When you invoke swiper press M-p to search for previously searched thing.
M-n will let you search for the word under cursor.
C-s will search for the next occurence.
UPD, thx @Basil
After you ...
9
votes
Accepted
How to ignore certain filename patterns in `find-file`/`counsel-find-file`?
Yes, use counsel-find-file-ignore-regexp.
For the simple example you provide use
(setq counsel-find-file-ignore-regexp "\\.elc\\'")
The are more examples in the docstring for that variable.
9
votes
Accepted
8
votes
Accepted
Extending word search selection in swiper
Try M-j, which is bound to ivy-yank-word in the ivy minibuffer key map.
It's worth reading through the the ivy manual, either in Emacs or online. The relevant key bindings are discussed here: http://...
8
votes
What's the equivalent of `helm-find` in ivy/counsel? I want to find files **recursively**
The counsel equivalent of helm-find is counsel-file-jump.
See also counsel-dired-jump and John Kitchin's answer for suggestions on writing a custom function.
8
votes
Ivy disable completion for a command in minibuffer
There are multiple approaches to file navigation that apply here.
Just to rephrase your statement:
switch from ~/code/study to ~/other/code/study
Easiest and most consistent: use ~ to switch to ~/...
8
votes
Accepted
Insert file path via counsel
What would be more convenient is for me to do so via counsel-find-file, navigate to the file path and then insert at the point in the current buffer (or some similar workflow with autocompletion) ...
7
votes
Enable ivy fuzzy matching everywhere, except in swiper
If you want to turn off regex matching in swiper, but keep it active elsewhere, add this to your user-init-file:
(setq ivy-re-builders-alist
'((swiper . regexp-quote)
(t . ivy--...
7
votes
Accepted
Omit current and parent directories in Ivy find-file completion
When I'm opening a file I'd like . and .. to be omitted from the list of completion candidates.
This is what the user option ivy-extra-directories is for:
ivy-extra-directories is a variable defined ...
7
votes
Accepted
Open directory containing file during counsel-file-jump
You can create a new Ivy action that opens the directory of a file name selection. It can be done with:
(defun my/ivy-open-dir-action (x)
(interactive)
(dired (or (file-name-directory x)
...
6
votes
How can I setup eshell to use ivy for tab completion?
I found something that seems to work OK upon initial testing: essentially rebind <tab> to pcomplete-std-complete, but since that function isn't interactive for some reason, you need to wrap it:
...
6
votes
Accepted
After enabling ivy-mode, `dired-create-directory' does not allow me to choose an entry not in the completion list
Yes.
There are 2 cases. The name you want to create doesn't match anything in the completion list, or when it does.
When it doesn't, you can just type in the name and press enter.
If it does match, ...
6
votes
Accepted
Edit org-mode tags using ido or ivy completion
For those users of an ivy/counsel persuasion, the command counsel-org-tag (added in v0.6 AFAICT) enables ivy-backed completion (including multiple selection and deselection) of org-mode tags:
...
6
votes
How to toggle regex for helm/ivy user input?
If it's not possible for helm, how about ivy/counsel/swiper?
Ivy is the library which Swiper search and Counsel convenience functions are backed by, so changing the way Ivy interprets its input ...
6
votes
Accepted
How to keep Ivy from quitting when I press backspace in the minibuffer?
Ivy provides a user option to control this behaviour. Quoth (ivy) Defcustoms (edit mine):
-- User Option: ivy-on-del-error-function
Specify what [to do] when ‘DEL’ (‘ivy-backward-delete-char’) ...
6
votes
Accepted
Ivy: sort candidates by most recently used
I would suggest using ivy-prescient. It is a package that provides sorting and filtering for ivy.
After installing it, you enable it with ivy-prescient-mode.
For more details on it's usage see its ...
6
votes
Accepted
ivy counsel find-file with similar name
Using C-M-j when you're at prompt line. Binds to ivy-immediate-done
As manual states it goes with current input instead the current candidate.
6
votes
An ivy function for recently opened files?
You're looking for counsel-recentf, which comes with counsel.
Just M-x counsel-recentf or bind it to any keys you'd like and that's all you're looking for.
Loosely speaking Ivy is the completion ...
6
votes
Accepted
How can I edit the beginning of the counsel-find-file filename whilst preserving the rest
Press C-M-y (ivy-insert-current-full) to yank the current directory on to the end of the current path. This can then be edited as usual and then hitting tab goes back to normal ivy completion.
Thanks ...
5
votes
Accepted
HTML-mode insert tag without attribute(s)
As stated in my comment, the problem seemed to relate to ivy, a fantastic generic completion mechanism for Emacs.
Somehow i failed to realise what was going on: ivy was doing its job and providing ...
5
votes
Accepted
How to switch between Ivy completion styles?
The code in this answer is now part of Ivy: https://github.com/abo-abo/swiper/commit/ae438ff62fa3d9b98d899afc0e97c13be2148725
Within ivy-hydra, the m key is bound to the command ivy-toggle-fuzzy, ...
5
votes
Accepted
distinguish ido/ivy's virtual-buffers with equal names using directory?
According to https://github.com/abo-abo/swiper/issues/648, it's simply
(setq ivy-virtual-abbreviate 'full)
It's not quite as nice as opened buffers (where only the differing part is shown), but ...
5
votes
Accepted
How to remove files from recentf / ivy-virtual-buffers?
Ivy already has an action bound to "k" for ivy-switch-buffer, but it just calls kill-buffer so it does not work on virtual buffers.
Based on what ido is doing, here's some code to replace the ...
5
votes
Accepted
Create a new file in a new folder
In ivy, it can not to create directly a new file in a new folder
Emacs can do this regardless of whether ivy-mode is enabled, or whether you are using counsel-find-file. You will be prompted to ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
ivy × 144counsel × 37
completion × 15
swiper × 14
minibuffer × 11
find-file × 10
key-bindings × 9
org-mode × 7
projectile × 7
dired × 6
faces × 6
spacemacs × 5
buffers × 5
tramp × 5
search × 5
files × 5
helm × 4
ido × 4
recentf × 4
completing-read × 4
init-file × 3
commands × 3
isearch × 3
prelude × 3
hydra × 3