Configure Changes to list files before folders

Answered

The directory hierarchy in a Changes view lists a subfolder and its contents before files in the same folder:

v [] PROJECT
v [] DIR
o FILE2
o FILE1

Is there a way to configure it so that files are listed before subdirectories? Perhaps, like "Flatten Packages" does in the Project view:

v [] PROJECT
o FILE1
v [] PROJECT.DIR
o FILE2

I want to do this so that I can navigate changes in the same order as git diff, which lists files before subfolders:

M     PROJECT/FILE1
M PROJECT/DIR/FILE2
0
7 comments

Hi, 

Which version of IDE are you using?

The look you have mentioned should be default (as see on screenshot)

And by clicking on an Eye icon, you should disable groups:

 

Please feel free to share screenshots if I misunderstood you. 

0

Not sure what you mean. The screenshot you provided lists subfolder ("dino") and its contents ("dinobbs.java" and "hello.jar") before the file in the same folder ("Main.java"). That is the same behaviour I described first; the undesired behaviour.

If you do:

 git diff --name-status

I believe you would see:

M    Main.java
M    src/dinobbs.java
M    src/hello.java

That is the order I am looking for in IDEA.

0

(Actually, by not grouping, I think the order in your screenshot is actually alphabetical by file name.)

0

I initially misunderstood you, sorry. 

In this case you will need to use grouping (by either directory or module) 

Otherwise files are alphabetically sorted. 

In case you would like to see this changed, please feel free to open a suggestion on our YouTrack. 

0

Also, is there any particular reason you are not using grouping?

0

Either of these groupings causes the subdirectories to be listed first, as in my first example. I want files before subdirectories. That can be achieved in the project listing, by specifying "Flatten Packages". But that option is not available in a Changes view.

0

I understand. Please feel free to open a suggestion on our YouTrack. 

0

Please sign in to leave a comment.