kien / ctrlp.vim

Fuzzy file, buffer, mru, tag, etc finder.
kien.github.com/ctrlp.vim
7.26k stars 676 forks source link

Use `;` to filter the match results #400

Open happypeter opened 11 years ago

happypeter commented 11 years ago

Just switched from fuzzyfinder a week ago, ctrlp brings me many things I wish fuf have, yes, it's cool.

One thing I do miss is the ; operator when you typing matching strings with fuf. Say, I have two files named "good_controller" and "bad_controller", with fuf I could first type controller, then I got two matches of course, but instead of deleting and retyping, I could add ;good to the end of controller. Now I got the only match.

Yes, there is always the thing that comes BEFORE what I already typed(surely it's getting more so when I am in path mode). So @kien do you think ; is nice to have?

kien commented 11 years ago

That already exists. You can use ; in filename mode to filter the directories in front of the filename.

kien commented 11 years ago

Oh I'm sorry, what you're proposing is a bit different. It's indeed nice to have. I'll look into improving the existing ;.

happypeter commented 11 years ago

You can use ; in filename mode to filter the directories in front of the filename.

I didn't realized I could do this when I was trying the ;, thx, but maybe we can mark this somewhere in the help file. This is cool, but for me, not as cool as what I had with fuzzyfinder.

What is practically sweeter for my daily use is that we can make this work in both filename and path mode, and what comes after ; can either be part of a filename or dir names. It's to me not only more powerful but also more natural.

d11wtq commented 11 years ago

@happypeter so basically just see ; as an AND operator? this;and that;and the other.

happypeter commented 11 years ago

@d11wtq Yes. For me this is a live saving thing. It means the order doesn't matter any more.

kien commented 11 years ago

maybe we can mark this somewhere in the help file.

It's mentioned in the help file, actually, under the ctrlp-input-formats section.

happypeter commented 11 years ago

@kien Thx, did not do enough homework, only searched ;, not semicolon :smile:

neitanod commented 10 years ago

So... does CtrlP have an AND operator?