When I use helm-find-files to search for a directory. I would like it to display exact matches and directories first in the list of candidates, followed by files.

For example, searching for "src" gives the following results:


How can I make "src" show up first, since it's an exact match and also a directory? Or, baring that, making hidden "." files go to the end of the list (since it seems to be in alphabetical order?)

  • 1
    ^src$ should match only src.
    – abo-abo
    Dec 31 '14 at 14:34
  • 1
    @abo-abo yeah, I know I could add regexp for it, but I'd like to change the default sort order when it's not specified
    – Lee H
    Dec 31 '14 at 14:38
  • 1
    Are you aware of the new flex matching, and do you want to turn it off? If you want this sort behavior with flex matching enabled (which it is by default), then I think the helm devs are working on it, but it's not ready yet.
    – PythonNut
    Jan 2 '15 at 5:04
  • 1
    @LeeH the github issue is the source for all information helm-fuzzy related at the moment.
    – PythonNut
    Jan 2 '15 at 15:58
  • 2
    @LeeH You should update to the latest Helm. It is fixed now. A new custom variable is added: helm-find-files-sort-directories. To enable your desired behavior, set it to t.
    – Tu Do
    Jan 4 '15 at 14:13

According to the comments from @Tu Do above, apparently that was possible at one time, but the feature has been taken out in commit 8489bee and related commits.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.