Vscode: Add support for use case-sensitive sorting in File Explorer

Created on 16 Oct 2017  路  4Comments  路  Source: microsoft/vscode

It's a feature request.

  • VSCode Version: Version 1.17.1 (1.17.1)
  • OS Version: macOS 10.13.1 Beta (17B35a)

Current sorting behavior

- CODE_OF_CONDUCT.md
- composer.json
- CONTRIBUTING.md

Wannted sorting behavior

- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- composer.json

It can be an option of File Explorer, like:

"explorer.caseSensitiveSorting": true
*out-of-scope feature-request file-explorer help wanted

Most helpful comment

@pradeepmurugesan feel free to submit a pr where we can discuss this further.
@bpasero fyi

All 4 comments

There is already explorer.sortOrder which accepts a lot of options. This would be a new option. We accepts PRs that fix this.
Code pointer https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/files/browser/views/explorerViewer.ts#L595

Also requires a change in the sort function ? When I browsed through the code I could find

https://github.com/Microsoft/vscode/blob/master/src/vs/base/common/comparers.ts#L59

is responsible for comparing the filenames and converts everything to lowecase by default.

I believe should also change the method signature here to accept whether its a case-sensitive or case-insensitive comparison. The value of the flag may be case-insensitive by default.

something like

noIntlCompareFileNames(one: string, other: string, caseSensitive:boolean = false): number

Kindly correct me if I am wrong.

@pradeepmurugesan feel free to submit a pr where we can discuss this further.
@bpasero fyi

This iteration we focus on issue grooming. This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider.

If you wonder what we are up to, please see our roadmap and issue reporting guidelines.

Thanks for your understanding and happy coding!

Was this page helpful?
0 / 5 - 0 ratings