New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore directories from completion using ivy #408

swarnendubiswas opened this Issue Feb 28, 2016 · 2 comments


None yet
2 participants

swarnendubiswas commented Feb 28, 2016

I want to ignore directories like ".dropbox_" under my home directory while completing with ivy. When I type d (small case, easier to type) with counsel-find-file, the completion list lists installation directories like ".dropbox_" before "Dropbox", which is not what I want. Note that I have the following: (setq case-fold-search t ivy-case-fold-search t).

I get the desired behavior (list Dropbox first) with ido by using ido-ignore-directories. Is there an equivalent in ivy? Otherwise, it might be an useful addition.


This comment has been minimized.


abo-abo commented Feb 29, 2016


(setq counsel-find-file-ignore-regexp "\\`\\.dropbox")

and counsel-find-file, instead of regular find-file.

abo-abo added a commit that referenced this issue Feb 29, 2016

"C-x C-f" can un-ignore dotfiles with a leading dot input
* counsel.el (counsel-find-file-ignore-regexp): Add a recommended value,
all dotfiles.
(counsel--find-file-matcher): When `ivy-text' starts with a dot, don't
use `counsel-find-file-ignore-regexp'. The generic way to do this is
with "C-c C-a" (`ivy-toggle-ignore'), but this is faster and more convenient.

Re #408

This comment has been minimized.

swarnendubiswas commented Feb 29, 2016

That works, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment