Search code examples
emacsprojectile

How to use emacs projectile-find-file without "full path"?


I'm new to Emacs, so recently I faced the problem of "how to quickly find and open a file in emacs?" (something like Go-to in sublime/atom, Cmd-P). As a solution I'm using projectile package, but its behaviour is slightly different in the following scenario. If I want to narrow down my search providing only parts of the path, it wont be able to find the file I'm looking for. Eg.

Given the following file on my project:

my-project/lib/something/bananas

on emacs, I run M-x projectile-find-file or C-c p f, how could I find the above file providing only lib and bananas?

If i type bananas(only) I can find the file, what I'm looking for is a way of narrow the search as I might have multiple files named bananas

I tried something like lib/*/bananas but didn't work.

Basically the behaviour that I'm trying to achieve is equivalent to this:

atom example (link to example as unfortunately I don't have reputation(points) enough to upload a photo here)


Solution

  • For me it works with

    M-x projectile-find-file or C-c p f
    

    Just separate search tags with space, in your example:

    lib bananas