Reputation: 6003
suppose I have the following ONE file under
src/scala/com/example/
src/scala/com/example/test.scala
and now I am under src folder in dired. Now I have to click multiple times to locate test.scala. But since there is only one file, is it possible to go to the most deep level where there is more than 1 files, of there is only one file, then go to the most deep level folder? I find IDEA IDE have that function, If I click a folder, then it will expand the folder all the way down to the most deep folder with at least 2 sub folders. It doesn't make sense to click a folder, get a single folder, then click that single folder, etc.
Upvotes: 1
Views: 107
Reputation: 30708
If you are trying to locate a file named test.scala
somewhere under directory src
then use command locate-file
.
If you use Icicles then you can use multi-command icicle-locate-file
, which is similar but lets you match any part(s) of the file name or its path (i.e., the full, absolute file name). Matching can be fuzzy, regexp, substring, prefix,...
Upvotes: 0
Reputation: 3067
There are a couple of options which do not do exactly this but fulfil some of the same use cases. Firstly tools like ido.el
will let you move to subdirectories very quickly. Another very powerful tool is M-x find-dired
which runs find and dumps the results into dired. In your case, invoking M-x find-dired
with all the defaults will search from src/
downwards listing all the files (which will include test.scala
as well as the directories).
Upvotes: 1