Questions tagged [ivy]

Ivy is a generic completion mechanism for Emacs.

Filter by
Sorted by
Tagged with
0
votes
1answer
44 views

How to call ivy-occur programmatically?

I would like to programmatically call an ivy or counsel function and then immediately execute ivy-occur to get the ivy-occur buffer. Example: Instead of doing M-x counsel-describe-function and C-c C-...
0
votes
1answer
35 views

dired-do-copy in tramp does not go to local when `\ C-j` is pressed. File path stays in the same directory

I am using dired-do-copy to copy a file from remote using tramp to local. When Copy file to path is promted. I used / C-j to go to local path but the path stays in the same directory , does not go to ...
0
votes
0answers
36 views

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 ...
0
votes
1answer
58 views

How to refresh dabbrev candidates displayed by company after each save

I've been using Ivy Irony Company for some time and it works great on all libraries I included in my C++ program so far, but I've noticed Ivy rarely auto-completes my user defined classes, objects, ...
2
votes
1answer
83 views

How to tell Ivy to use completing-read-default for specific command? (org-tags-view, in particular)

Ivy (+swiper +counsel) is very cool and I use it constantly for an ever growing number of tasks. But there are some cases in which the requirements of a certain completion task defeats Ivy's logic. ...
0
votes
0answers
19 views

ivy counsel-find-file doesn't change selection as more characters typed

I have (setq ivy-sort-matches-functions-alist '((t . ivy--prefix-sort))) If I am in a directory with files mc_multiword.txt and multiword.txt and am using counsel-find-...
1
vote
1answer
50 views

how to ignore current selection from ivy when my typed text matches one

I run into this issue from time to time when I want to create a new file but the new name matches a pattern already so my Ivy auto-complete setup will pick the matched option when I press Enter ...
0
votes
0answers
82 views

Make counsel-M-x look like Smex

I would like counsel-M-x (part of ivy) to display candidate commands horizontally, as Smex does. I followed the instructions here and created the following code: (defun my-ivy-format-function (cands)...
1
vote
0answers
73 views

emacs ivy: disable ido completition

I am using GNU Emacs 26.2 and ivy from melpa. When I run M-x and enter: M-x magit-status ivy suggests: ido-enter-magit-status magit-status magit-status-mode I don't use use ido, I have no idea ...
4
votes
1answer
107 views

Open directory containing file during counsel-file-jump

I use counsel-file-jump to search files recursively. I would like to open the directory that contains a particular file candidate. I can execute counsel-dired after I open the file, which allows me to ...
2
votes
0answers
14 views

How to prevent magit with ivy from selecting an author email address? [duplicate]

I have a git repository containing commits with 3 of my email addresses. When I try to view the log and filter by author (-A) and then enter a few letters of my last name, I see a list of the 3 email ...
3
votes
2answers
161 views

How to select a rotating Hydra option?

From SPC f f (counsel-find-file) minibuffer, open Hydra with C-o (hydra-ivy/body). This is what hydra looks on my system: The Hydra right column has "[m] matcher: order". Pressing 'm' rotates matcher ...
1
vote
1answer
77 views

`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 ...
0
votes
1answer
89 views

Why can't Emacs find counsel and swiper, even though they (and Ivy) seem installed, and Ivy working?

Why can't Emacs find counsel and swiper, even though they (as well as ivy) seem installed, and moreover Ivy mode is enabled, and seems to be working? This is what I get when I try the following: (...
2
votes
1answer
225 views

Equivalent to `ido-find-file` functionality for ivy/counsel?

I really like how ido-find-file, if it can’t find a file matching your string (and you’ve let it idle for like a second), will search your whole home directory for files matching that string, and then ...
2
votes
1answer
138 views

Emacs mark and copy/move to buffers or bookmarked directories

Is there a way to use bookmarks or the buffer list of open buffers to efficiently copy/move marked files/directories to another directory? As an example, imagine I want to copy the files foo.txt and ...
0
votes
0answers
39 views

counsel-org-tag on region

How can I use counsel-org-tag, or some similar command that uses counsel, to apply/remove tags to all headlines in the region? I would like the tags to be changed only at the highest selected ...
1
vote
2answers
292 views

Disable ivy for find-file

Is it possible to disable ivy-mode for file prompts? In a past I used find-file to copy current file name or path to file. dired-do-rename also is broken by Ivy: no default completion for current ...
3
votes
0answers
57 views

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 ...
1
vote
1answer
77 views

How to get sorted output from counsel-git-grep with ivy?

When using git-grep, the output isn't sorted alphabetically which makes navigating the results more tedious then it should be. Is there a way to sort the output? I checked git-grep and it seems ...
2
votes
1answer
643 views

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

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 ...
2
votes
1answer
40 views

Scope minibuffer history to specific Counsel commands

If I run bookmark-jump and use invoke M-p, it cycles through the history of bookmarks specifically. If I run counsel-bookmark-jump, M-p cycles through the generic minibuffer history, which is more or ...
1
vote
2answers
286 views

How can I store an org-link to a list of search results from ivy-occur?

When I use counsel-rg to grep through a directory hierarchy, once a list of search results has been displayed in the minibuffer, I can use ivy-occur to save the list in a dedicated buffer. How can I ...
0
votes
1answer
173 views

projectile-find-file and ivy - create file with subdirectories

I'm using ivy and projectile. When I search for some file with projectile-find-file, and the file does not exist, I would it to be created. If it is inside directories that also do not exist, ask if ...
0
votes
1answer
77 views

Unicode character folding with Swiper/Ivy

Suppose I have bár written in a file, I would like to look for bar in swiper and find the occurrences of bár alongside the expected occurrences of bar, how I can do this? This would also apply to ...
0
votes
1answer
576 views

Create a new file in a new folder

In Ivy, it can not to create directly a new file in a new folder (as type C-x C-f, then write a file path /current_path/new_fold/new_file). If there is a better way to do it, how to use the key ...
0
votes
1answer
66 views

Change face for non-selected ivy items

I'd like to change the foreground color of non-current ivy items. The only way that I've found to do that so far is to define my own ivy-format-function like this: (defun aj/ivy-format-function-line (...
2
votes
2answers
313 views

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?
0
votes
1answer
38 views

Cursor position variable

Here's my function: (defun scroller-down () "Scrolling down conditional for buffer and minibuffer." (interactive) (if (active-minibuffer-window) (ivy-scroll-down-command) (scroll-down-...
1
vote
1answer
210 views

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 ...
2
votes
1answer
228 views

Which faces do Ivy/Counsel use in the minibuffer?

Which faces are being applied to the indicated text, i.e. the strings 3114, M-x, and C-x C-c, in the following screenshot? I am using the packages Ivy and Counsel, in case that is relevant.
4
votes
2answers
611 views

How to toggle regex for helm/ivy user input?

IIUC, all helm commands (including helm-swoop, swiper-helm) have regex enabled by default for user input. Can we toggle/disable it by some command/shortcut? Let me know if I missed something. Using ...
4
votes
1answer
485 views

Display corresponding key binding of command during M-x completion

As an example, when I use M-x save-buffer Emacs says in the minibuffer: You can run the command ‘save-buffer’ with C-x C-s I'm using Swiper/Ivy; I want to know if there is a way to instruct Ivy to ...
2
votes
2answers
630 views

Swiper get last search term

How to get swiper to search for the last searched term , much like (default) isearch-forward does when pressing C-s twice?
2
votes
1answer
154 views

Omit current and parent directories in Ivy find-file completion

I'm using Ivy in a fairly standard Spacemacs setup. When I'm opening a file I'd like . and .. to be omitted from the list of completion candidates. In particular, I'd like to be able to tab through ...
3
votes
1answer
50 views

completion for .bash_history

I am considering implementing an ivy-powered bash_history greper for term-mode, but before I do I wanted to know if this has already been done, by some fancy company-bashhistory package or whatever. ...
2
votes
1answer
118 views

Rebind TAB to show help in counsel minibuffer

I'm in the process of migrating from helm to ivy/counsel, and I would like to replicate a binding that I had in my previous setup. When browsing the results minibuffer (for example in counsel-M-x), ...
2
votes
1answer
224 views

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 ...
2
votes
2answers
425 views

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 ...
3
votes
1answer
324 views

Show counsel-ag results in separate buffer?

I use counsel-projectile for Ivy + Projectile interoperability. But, when I run something like C-c p s s / M-x counsel-projectile-ag, the results are shown in the minibuffer, and I can't see any ...
1
vote
0answers
190 views

ivy-hydra: error upon C-o

While trying to figure out another problem. I was advised to use the ivy-hydra package. By default, it appears that ivy-hydra is NOT included with prelude-ivy. So I did a package-install ret ivy-...
0
votes
1answer
482 views

prelude-ivy: How to select and open multiple files

I have installed Ivy (along with Swiper and Counsel) as part of Prelude by doing a (require 'prelude-ivy) in my prelude-modules.el file. It seems to work, but I am not able to figure out how to do ...
4
votes
0answers
606 views

Hierarchical org refile support with ivy

When I enable ivy-mode in an org buffer and C-c C-w for refile, all headlines are presented as refile targets. So far so good. I relied on the org default setting (org-outline-path-complete-in-steps '...
2
votes
1answer
171 views

after previous `counsel-yank-pop`, `yank` the last yanked entry

short: after a counsel-yank-pop, yank does not yank the same entry. How can I achieve that behavior? long: Having a kill-ring like: foo bar baz When doing a C-y (yank) and M-y (yank-pop) 'bar' ...
1
vote
0answers
142 views

Specifying filetype when using counsel-git-grep

I'm using counsel-git-grep to search inside a project for a specific string, which works great. However, I would like to additionally specify a filetype pattern to reduce the result set. I tried ...
1
vote
0answers
114 views

how can i thoroughly change (key “C-x”) in ivy-minibuffer-map?

one thing very interesting, i tried to (define-key ivy-minibuffer-map (kbd "C-x") 'ivy-kill-line) ..well then i restart my emacs, the first time i use the ivy to complete something, i type C-x ...
6
votes
3answers
724 views

How to remove files from recentf / ivy-virtual-buffers?

I find ivy's virtual buffers feature ((setq ivy-use-virtual-buffers t)) very handy for navigating to files whose buffers have been closed. Like ido's virtual buffers,it uses recentf to present those ...
10
votes
2answers
3k views

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 ...
3
votes
1answer
270 views

More convenient auto-completion using ivy

I have the following lines in ~/.emacs: (require 'counsel) (with-eval-after-load 'org (define-key org-mode-map (kbd "C-c C-c") #'counsel-org-tag)) (with-eval-after-load 'org-agenda (define-key ...
0
votes
0answers
88 views

Accidentally deleted Ivy. Now what?

I went to M-x list-packages and accidentally deleted Ivy. How do I get it back in M-x list packages now?