oriolmirosa / open-files

Atom package to show the open files in the tree-view panel, mirroring the functionality in Sublime Text
https://atom.io/packages/open-files
MIT License
15 stars 10 forks source link

[REQUEST] Having the file order configurable, as tab-smart-sort #5

Closed misterbridge closed 7 years ago

misterbridge commented 7 years ago

I use tab-smart-sort (thanks to you actually) and I keep the default order "dir, ext, base" which I find really nice. I'd like my open files to have the same order as my tabs, so maybe you could add the same settings as tab-smart-sort "dir, ext, base" / "base, ext, dir (that's kinda what your default here)" / etc. ?

oriolmirosa commented 7 years ago

Added this functionality with commits 71aeb2297b7a6e9d5832eaada3fadc47f961aad5 and 306e120f115c80520d600324d02da8090a02e7bb. @misterbridge, it would be great if you could check that it works properly and re-open this bug if it doesn't, since I made a few quick changes that I'm not sure will work in all cases.

misterbridge commented 7 years ago

Great ! Works perfectly, thanks a lot !

misterbridge commented 7 years ago

Ha, actually I found a bug : As I sort first by "dir" I saw that you take care of the file's parent dir only, not the full tree. (When tab-smart-sort looks are the full tree => sort by the parent's parent's ... folder first) Edit : I don't know how to re-open this issue ...

oriolmirosa commented 7 years ago

Hmm, I'm a little confused @misterbridge . Right now, the sort function alphabetically compares the lower-cased version of the whole path of each file. That means that the higher in the tree, the higher up in the sort order a file will be. For each level in the tree, directories are then ordered alphabetically. I took most of this from tab-smart-sort, and it seems to work for me. Can you give me some more details of how it is not working for you, as well as of your system, so that I can figure out what's going on? Thanks!

misterbridge commented 7 years ago

Herer you can see it :

-- application ---- config -------- configuration.php -- test ---- config -------- configuration.php

Order : appli first, test second (on tab-smart-sort) Order : test first, appli second (on open-files)

open-files order issue

oriolmirosa commented 7 years ago

Thanks for the info, @misterbridge . I found what the problem was. This should be fixed with 96db3420ba38c4db03a3ebbd8321079dea980f7e, but please let me know if you are still encountering problems.

misterbridge commented 7 years ago

Fixed ! Thanks, perfect.