find-file-in-repository icon indicating copy to clipboard operation
find-file-in-repository copied to clipboard

Suggestion: prefer files closer to current directory

Open jwr opened this issue 9 years ago • 2 comments

If I'm editing f1.cljs and I type C-x C-f f2.cljs, it is likely that I mean the f2.cljs file in the same directory I'm in (or in the same directory that f1.cljs is in), or somewhere in the same subtree at least.

For now, instead of getting the f2.cljs in the same directory (src/project relative to project root in my case), the default is resources/public/js/compiled/out/project/f2.cljs.

In general, sorting project files is a problem that every file-opener has. I described in detail how I'd expect finding to work in another bug report for projectile: https://github.com/bbatsov/projectile/issues/549

jwr avatar Jan 11 '16 08:01 jwr

Jan, that sounds like a great idea, and would definitely be an improvement to how this works currently. In case you are interested in implementing the feature, I would be happy to integrate the pull request.

hoffstaetter avatar Jan 16 '16 21:01 hoffstaetter

Thank you — I don't think I can do the whole thing, but I will try to dig out the code I wrote for projectile and make it work.

jwr avatar Jan 25 '16 20:01 jwr