Questions tagged [counsel]

68 questions
26
votes
2 answers

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 (it does not interfere with the counsel-M-x…
dmw
  • 363
  • 3
  • 5
13
votes
1 answer

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 use ivy. The following code does almost…
Alex
  • 133
  • 1
  • 4
8
votes
1 answer

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 prevent counsel from doing that and only have RET…
7
votes
2 answers

How to ignore certain filename patterns in `find-file`/`counsel-find-file`?

When using stock find-file or counsel-find-file, is there a way to ignore certain files that I almost never want to open by hand? Examples include .elc files and backups.
Nova
  • 1,059
  • 9
  • 21
6
votes
0 answers

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-action (ivy-state-current ivy-last))) But it opens…
sivakov512
  • 516
  • 3
  • 13
5
votes
0 answers

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 the proximity to the current buffer that is open?…
SFbay007
  • 554
  • 4
  • 13
5
votes
1 answer

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 queries like string -- '*.filetype' but none of them…
kenda
  • 151
  • 1
5
votes
2 answers

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.
fhdhsni
  • 693
  • 6
  • 16
4
votes
1 answer

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 directories. For example, I might have…
Mike Crowe
  • 201
  • 1
  • 6
4
votes
1 answer

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 instead do something else useful or else do nothing…
MadScientist
  • 143
  • 3
4
votes
1 answer

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 one big massive Git repository which projectile…
Ashton Wiersdorf
  • 349
  • 1
  • 11
4
votes
1 answer

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 obvious way to move them to a buffer. Is there a way…
Henry
  • 203
  • 1
  • 5
3
votes
0 answers

How do I jump to the previous/next modification (relative to the git HEAD) in the current file?

How do I jump to the previous/next modification (relative to the git HEAD) in the current file? Ideally, I like sth like swiper that lets me choose to easily jump between modifications.
HappyFace
  • 751
  • 4
  • 16
3
votes
1 answer

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 your whole directory tree. (At least, I think…
Tina Russell
  • 380
  • 2
  • 10
3
votes
2 answers

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), I would like to have the help for the current…
1
2 3 4 5