Skip to content
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

Closed
swarnendubiswas opened this issue Feb 28, 2016 · 2 comments
Closed

Ignore directories from completion using ivy #408

swarnendubiswas opened this issue Feb 28, 2016 · 2 comments

Comments

@swarnendubiswas
Copy link

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.

@abo-abo
Copy link
Owner

abo-abo commented Feb 29, 2016

Use:

(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
* 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
@swarnendubiswas
Copy link
Author

That works, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants