Skip to main content
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 ...
tirocinium's user avatar
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 ...
Basil's user avatar
  • 12.5k
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 ...
Adrian Staniec's user avatar
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.
abo-abo's user avatar
  • 14.2k
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 (...
Basil's user avatar
  • 12.5k
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-...
abo-abo's user avatar
  • 14.2k
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 ...
Maxim Kim's user avatar
  • 1,796
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.
justbur's user avatar
  • 1,510
9 votes
Accepted

Show counsel-ag results in separate buffer?

Try C-c C-o (ivy-occur) in the minibuffer.
Erik Hetzner's user avatar
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://...
glucas's user avatar
  • 20.8k
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.
Basil's user avatar
  • 12.5k
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 ~/...
abo-abo's user avatar
  • 14.2k
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) ...
Basil's user avatar
  • 12.5k
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--...
cayhorstmann's user avatar
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 ...
Basil's user avatar
  • 12.5k
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) ...
Wanderley Guimarães's user avatar
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: ...
Omar's user avatar
  • 4,842
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, ...
icarus's user avatar
  • 1,934
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: ...
Basil's user avatar
  • 12.5k
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 ...
Basil's user avatar
  • 12.5k
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’) ...
Basil's user avatar
  • 12.5k
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 ...
Aquaactress's user avatar
  • 1,463
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.
Muihlinn's user avatar
  • 2,674
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 ...
Muihlinn's user avatar
  • 2,674
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 ...
Mike Crowe's user avatar
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 ...
Reverse_Polish's user avatar
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, ...
Basil's user avatar
  • 12.5k
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 ...
unhammer's user avatar
  • 1,201
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 ...
glucas's user avatar
  • 20.8k
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 ...
Basil's user avatar
  • 12.5k

Only top scored, non community-wiki answers of a minimum length are eligible