Questions tagged [ivy]

Ivy is a generic completion mechanism for Emacs.

From the Ivy Manual:

Ivy is an interactive interface for completion in Emacs. Emacs uses completion mechanism in a variety of contexts: code, menus, commands, variables, functions, etc. Completion entails listing, sorting, filtering, previewing, and applying actions on selected items. When active, ivy-mode completes the selection process by narrowing available choices while previewing in the minibuffer. Selecting the final candidate is either through simple keyboard character inputs or through powerful regular expressions.

146 questions
21
votes
2 answers

Enable ivy fuzzy matching everywhere, except in swiper

I have been using flx-ido-mode for a while and I like it. Ivy can behave the same way by using ivy--regex-fuzzy. The problem is that swiper will also use fuzzy matching now and in this case I don't really like it (at least not as a default, all the…
B_old
  • 717
  • 1
  • 5
  • 14
7
votes
1 answer

How do I prevent autocompletion when trying to save a file?

I have an existing directory called ~/app_scripts and a buffer open with a file I would like to save. I want to save it to ~/scripts/script.py, but the ~/scripts dir does not yet exist. When I hit C-x C-s to save, I try to type ~/scripts/ but it…
vaer-k
  • 231
  • 3
  • 8
5
votes
1 answer

Does ivy-occur have a follow mode?

In org-agenda, it is possible to enable a "follow mode" so that moving the point over an agenda item automatically displays the linked item in another window. In ivy-occur, you need to press f to get this, it doesn't happen automatically. Is there a…
Matthew Piziak
  • 6,038
  • 3
  • 31
  • 79
5
votes
1 answer

How to switch between Ivy completion styles?

There are three Ivy completion styles: ivy--regex-plus ivy--regex-ignore-order ivy--regex-fuzzy C-o (hydra-ivy/body) m toggles between ivy "ivy--regex-plus" and "ivy--regex-fuzzy". How to switch to ivy--regex-ignore-order completion style? For…
wolfv
  • 1,393
  • 1
  • 13
  • 30
3
votes
2 answers

Insert file path via counsel

A common part of my workflow is to copy and paste file paths into Emacs. This is usually done by navigating to the file in my desktop environment or from a terminal. What would be more convenient is for me to do so via counsel-find-file, navigate to…
Bryce Frank
  • 175
  • 7
2
votes
1 answer

`ivy-read`: How to run action on every selection change?

I have been trying to implement a function with ivy that needs to run a particular function not only on selection but also on every selection change in the list. To be specific, when the user scrolls the list of available options, the currently…
myTerminal
  • 427
  • 1
  • 5
  • 15
2
votes
2 answers

How to stop "completing-read" / "ivy-completing-read" from sorting?

Recently, when using Ivy and calling completing-read, my output is being sorted (instead of showing up in the order passed in). How can I prevent sorting the input to completing-read when using Ivy?
ideasman42
  • 8,786
  • 1
  • 32
  • 114
2
votes
1 answer

How to keep Ivy from quitting when I press backspace in the minibuffer?

It's pretty annoying when I hold down Backspace one character too long in the minibuffer, causing Ivy to quit and then accidentally deleting some characters in the main buffer I'm working in. How do I change this behaviour?
John DeBord
  • 570
  • 3
  • 14
2
votes
1 answer

Disable ivy-mode in a specific buffer

Evaluating (ivy-mode 0) in a buffer kills ivy across all the other buffers, too. How to stop ivy in a specific buffer only (I don't need it in ERC, where i want TAB to give me a list of all the people in the channel, not just ten of them).
Mali Remorker
  • 319
  • 1
  • 8
2
votes
1 answer

Change face for ivy-custom-match

From the Ivy manual: Customizability is about being able to use different methods and interfaces of completion to tailor the selection process. For example, adding a custom display function that points to a selected candidate with ->, instead of…
1
vote
1 answer

Fuzzy Search with Counsel

I have this function: crux-rename-file-and-buffer , but when I do M-x rename, why isn't this shown as an alternative? I thought ivy was supposed to assist with that, using a fuzzy search? Why is it not picking this up? My config to enable fuzzy: …
Jason Hunter
  • 709
  • 4
  • 10
0
votes
0 answers

How do I create a new file when there is already a similarly named one in the directory?

I want to create a file in Emacs called article.html.pm but I already have a file called article.html.pmd in the directory. Since I have Ivy it automatically finds the article.html.pmd and helpfully opens it since it's "close enough". But in this…
decabytes
  • 149
  • 4
0
votes
0 answers

ivy-switch-buffer, Narrow Results

When I C-x b with ivy-switch-buffer, I see that I have a README.md on line 6. If I enter md, I see that the README.md is now on line 13. How can that be? The first results are nonsensical, like helm-mode-magit-show-commit; why would it show that…
Jason Hunter
  • 709
  • 4
  • 10
0
votes
1 answer

Auto-load Ivy.elc failed to define swiper

I get the followingerror message: command-execute: Autoloading file /home/user/.emacs.d/elpa/ivy-20210506.2157/ivy.elc failed to define function swiper after just having installed emacs 27.2 and having this init.el: ;General Configuration (setq…
0
votes
0 answers

emacs ivy always selecting default function

I just started trying out ivy. I took the following example from the ivy tutorial: (defun my-action-1 (x) (message "action-1: %s" x)) (defun my-action-2 (x) (message "action-2: %s" x)) (defun my-action-3 (x) (message "action-3: %s"…