Skip to content

Sort by Type: sort by extension instead of language-type #11271

Closed

Description

@Yaron10

STR:
Open 3 files: a.h, c.h and b.cpp.
Window -> Sort By -> Type A to Z.

Result:
The order is: a.h b.cpp c.h.
(Same result when sorting via the Window dialog).

Expected:
I think that most users would want and expect b.cpp a.h d.h.
The sorting should be based on file-extension instead of language-type.


Using the latest 2d1ba01 in Master.

Activity

  1. alankilborn commented on Feb 23, 2022

    @alankilborn
    Contributor

    Expected:
    I think that most users would want and expect b.cpp a.h d.h.
    The sorting should be based on file-extension instead of language-type.

    What would this idea do to same base-named files?

    For example, I'd want:

    foo.cpp and foo.h next to each other, bar.cpp and bar.h together...

    As in: bar.cpp, bar.h, foo.cpp foo.h

    Wouldn't most C++ devs want this?

  2. Yaron10 commented on Feb 23, 2022

    @Yaron10
    Author

    @alankilborn,

    I did think about that case. And I had a feeling you'd bring it up. :)

    In many cases one would want the .h files next to each other.
    Besides - for most users, Sort by Type means sort by extension.

    Perhaps adding Sort by Language Type would be best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions