Questions tagged [counsel]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
23
votes
2answers
3k views

Counsel M-x always shows “^”

I installed Counsel/Ivy/Swiper and so far everything works fine. But when I call counsel-M-x via key bind M-x an "^" char is always added. I have no clue why this is happening and how to get rid of it ...
12
votes
1answer
3k views

Code auto completion with ivy

In a big C++ project I use dabberv-expand (aka M-/). Rtags, ctags, csope etc do not work by different reasons. Unfortunately I do not know how to enforce dabbrev to use a fuzzy search. So I decided to ...
8
votes
1answer
949 views

Do not open dired for directories when using counsel-find-file

I've recently started using spacemacs with ivy, and what drives me nuts is that I instinctively press RET when a directory is selected to descend into it, which opens dired instead. Is there a way to ...
6
votes
0answers
364 views

ivy preview buffer without buffer creation

When searching in a project using a counsel-ag, I want to implement a preview, similar to the counsel-grep. Now I use copy-paste from counsel-ag with :update-fn (lambda () (counsel-grep-...
5
votes
2answers
1k views

What's the equivalent of `helm-find` in ivy/counsel? I want to find files **recursively**

helm-find is Preconfigured ‘helm’ for the find shell command I need the same functionality with ivy/counsel.
5
votes
0answers
133 views

Sort ripgrep results based on proximity to current buffer

I use counsel-projectile-rg to search within the project I work on. But there is my sub-project inside this big repo that most of my development is in. Is there a way to sort ripgrep results based on ...
4
votes
1answer
512 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 ...
4
votes
1answer
285 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 ...
3
votes
2answers
189 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), ...
3
votes
1answer
519 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
113 views

ivy counsel find-file with similar name

In the directory I have mongodb.js, now I want to create a db.js file but if I type the name and press enter counsel-find-file use regex to open mongodb.js. How can i create a db.js with counsel-find-...
2
votes
1answer
241 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' ...
2
votes
1answer
348 views

default of “calling” when run counsel-git-grep

counsel-git-grep is nice to search git repository, but by default it can't show the candidate lively. Meaning if I use down arrow to select the next candidate, the buffer doesn't change, and one ...
2
votes
0answers
47 views

How do I cycle through file locations on counsel results?

I'm trying to look for all the occurrences of a word in my project and I'm using counsel for this. I get the list of occurrences and their locations in the minibuffer, but I'd like to cycle through ...
2
votes
0answers
71 views

migrated from emacs 25 to 26.1: cannot force find-file/counsel-projectile-find-file to always open buffer in current window

Recently I migrated from emacs 25 to 26.1. Before I reached the window behaviour, where I could always open a file at the window at point. The most simple case to illustrate undesired behaviour: I ...
1
vote
2answers
492 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 ...
1
vote
1answer
125 views

Selecting a directory like counsel-find-file

I would like to write a function that would prompt the user to select a directory, using an UI like that presented by counsel-find-file. The starting directory should be an arbitrary directory passed ...
1
vote
1answer
145 views

Don't show “.” and “..” in counsel-find-file

I have a thing where I just don't like editing directories in emacs, and I never want to enter dired mode. Any time anything might want to put me into dired mode, I would prefer it not do that and ...
1
vote
1answer
295 views

Can counsel functions use ido-flex style matching?

I've gotten so used to (setq ido-enable-flex-matching t) that I really notice its absence in various counsel-FOO functions. Is there a way to turn on flex matching for counsel? I haven’t been able ...
1
vote
1answer
307 views

Using default results with ivy and `read-file-name`

I have recently started using ivy, and I've been very happy with it. The only behaviour which I've found quite surprising, is the combination of completions and read-file-name. As an example, if I ...
1
vote
1answer
52 views

How can I edit the beginning of the counsel-find-file filename whilst preserving the rest

I work on projects with deep directory structures and have several copies in different top-level directories. I sometimes find myself wanting to open the corresponding file in one of the other ...
1
vote
1answer
54 views

How to search word under cursor using counsel-git-grep

I am using counsel-git-grep to grep for a string in the current Git repository. When I do M-x counsel-git-grep it opens following in the mini-buffer. 2 git grep: 3 chars more Let say if the ...
1
vote
1answer
32 views

How can I tell counsel's `counsel-git` to ignore certain file endings and folders

I am using counsel-git to find and open files. Is there any way to ignore folders and files that are ending with specific pattern. For example: ignore folders named: .idea ; and files ended with *....
1
vote
2answers
505 views

Projectile switch between opened projects

I often have to work with multiple related projects and switching between them can become hard. I use counsel-projectile and it really makes everything easier. To be clear, I am not talking about ...
1
vote
1answer
48 views

Why does ivy 1.13.0 from GNU ELPA have counsel included?

MELPA has a package called counsel. Most guides on the ivy package recommend installing counsel as well. GNU ELPA doesn't have counsel. Why doesn't it? I've installed ivy 0.13.0 from GNU ELPA. I don'...
1
vote
1answer
99 views

counsel-ag shows no output

I try to use counsel-ag to grep through all files in a directory for a string. Basically, I thought this is what it was made for. I have ag 2.2.0 installed via macports on OS X 10.10.5 and it works ...
1
vote
0answers
35 views

How to change counsel grep options once activated? (counsel-rg, counsel-git-grep … etc)

I would like to have the ability to change the flags passed to grep once counsel-rg has been stated. For example, sometimes I start counsel-rg and type in a string that needs a lot of escaping. In ...
1
vote
1answer
203 views

Searching a specific project sub-directory with projectile

I recently found Projectile and I am loving it. I really like the ivy/counsel integration as well. One thing is missing though: I am working on a huge project of hundreds of files. This is stored in ...
1
vote
0answers
15 views

Accessing login-shell variables (from counsel-find-file)

With #'counsel-find-file, I can type $ to access environment variables, but it appears these belong to a special emacs environment and are not login-shell-wide. Can I access the latter kind of ...
1
vote
0answers
191 views

Use counsel/ivy to insert org-links?

I'm trying to use counsel/ivy to insert org links, but I haven't found a way to do this. I just want something to replace org-insert-link with a counsel interface. Can anyone help?
0
votes
2answers
65 views

counsel-rg how to repeat last search?

When repeat invoking counsel-ag, counsel-rg, counsel-projectile-rg etc, how can I quickly bring back the previous search term without retyping the query?
0
votes
1answer
113 views

temporary change magit-display-buffer-function

I have create this little helper to easy jump to my last used git projects, I using magit-status-internal to open a status buffer and I set magit-display-buffer-function so that the status is open in ...
0
votes
1answer
578 views

Making counsel-find-file not open dired on ./

I sometimes "accidentally" hit TAB again when I've already completed myself into a subdirectory. This means the current dir ./ is highlighted and ivy opens it with dired. This is basically never ever ...
0
votes
1answer
51 views

Ivy: How can I execute an action on a selection without opening the action menu?

Apologies if the question is poorly formulated, I am a beginner at understanding internals of Emacs/packages. I am using using Doom Emacs, which provides Ivy as an interface for, for example, finding ...
0
votes
1answer
29 views

Follow org links in current buffer with ivy

How can I follow org links in the current buffer using ivy? This is similar functionality to m (M-x Info-menu) in info with ivy/counsel installed. The command should list with ivy everything that ...
0
votes
1answer
30 views

How to use counsel-git-grep without using back slash

I am using counsel-git-grep to grep for a string in the current Git repository. Lets assume I am searching string " [ok] ". In order to obtain correct results I have to provide input as &...
0
votes
1answer
37 views

How to change coloring in counsel

I am using counsel-buffer-or-recentf in order to toggle in files under buffer and recentf. The selected line is not clear, which has blue background highlighting. => Is it possible to change the ...
0
votes
1answer
42 views

Why does `term-emulate-terminal` get executed every time `read-from-minibuffer` gets executed?

Why does term-emulate-terminal get executed every time I execute counsel-switch-buffer if and only if the *terminal* buffer is open in a window. If the *terminal* buffer is not in a window term-...
0
votes
2answers
222 views

enable counsel-projectile by default

I want to enable counsel-projectile-mode by default. I have added (counsel-projectile-mode) to .emacs file as per project's usage guide but it doesn't work; meaning projectile still uses ido for ...
0
votes
1answer
529 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: (...
0
votes
2answers
98 views

How can I search through registers via counsel?

I need something like helm-register which lists all the registers and it can be searched through.
0
votes
0answers
12 views

How can disable TAB to execute selected line in `counsel-M-x`?

I am using counsel-M-x, it has little bit different behavior than smex, where TAB may execute the line. Is it possible to use TAB only for toggling where I just want to disable feature to execute the ...
0
votes
0answers
42 views

How can I change background and font color in `counsel-M-x`?

I have following theme configuration for the counsel-M-x, where due to background color some are unreadable. I couldn't find a way to change their colors, such as on [l]ist- , l is unreadable due to ...
0
votes
0answers
8 views

Can counsel-git-grep for string search keep the history of previous searches?

In general when I run M-x and do control-p or control-n or (M-p) (M-n) I can move around the previous inputs that I provided in the past. Is it possible to achieve it in counsel-git-grep ? I am using ...
0
votes
1answer
99 views

How to use ivy to select email attachments with mu4e

I use the mu4e package to read my emails. However, I also use the ivy completion framework, which includes file completion. Using both packages together is a bit of a problem though. mu4e uses its own ...
0
votes
0answers
17 views

How to use counsel-git-grep for string search that has space?

I am using counsel-git-grep to grep for a string in the current Git repository. Lets assume I am searching string " hello world ". In order to obtain correct results I have to provide input ...
0
votes
1answer
41 views

Why ivy-immediate-done is not shown in counsel-M-x

I realize that ivy-immediate-done is not shown in counsel-M-x. Since it's an interactive command, I'm assuming counsel-M-x somehow filters it from its result. But a quick search of the function name ...
0
votes
0answers
51 views

Some keybinding stopped working this morning with error “Wrong type argument: arrayp, nil”

I used counsel-org-goto-all to jump between headings. This morning, the command (which I have bound to C-;) stopped working with this error: Wrong type argument: arrayp, nil. I have searched on the ...
0
votes
0answers
47 views

Using Counsel with write-file and insert-file

What is the simplest way to have Counsel versions of write-file (C-x C-w) and insert-file (C-x i)? I would like these replacements to work similarly to counsel-find-file (typically bound to C-x C-f). ...
0
votes
0answers
58 views

C-g doesn't work within Counsel's action menu (M-o)

Let's say I'm completing a file with counsel-find-file. I then press M-o to show the menu with available actions. If within that menu, I press C-g, I get the message "C-g is not bound". The ...