Skip to content

Skip * by default in special buffers #595

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

Closed
justbur opened this issue Jul 22, 2016 · 2 comments
Closed

Skip * by default in special buffers #595

justbur opened this issue Jul 22, 2016 · 2 comments

Comments

@justbur
Copy link
Contributor

justbur commented Jul 22, 2016

I'm asking as an issue because I'm not sure how you would do this, but I'm consistently annoyed when I want to switch to *scratch* for instance and I type sc and get some file from the virtual buffer list that starts with sc. The issue of course is that the regex is prioritizing the match to the first two characters which is fine, but I think of *scratch* as starting with sc. Of course I could enter *s and get there quickly, but I was thinking it would be nice to have he option to ignore the * for the purpose of matching buffers. What do you think?

@abo-abo
Copy link
Owner

abo-abo commented Jul 22, 2016

I think it can be handled pretty well with ivy-sort-matches-functions-alist. Just write a custom function that sorts e.g. *scratch* on top of misc. It could be quite simple: prioritize the prefix matches and discard the leading star. It would be nice to have such a function available for customization as well.

@justbur
Copy link
Contributor Author

justbur commented Jul 29, 2016

Looks good. 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