Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Label each command explicitly saying whether it's case sensitive or case insensitive #19

Open
Eldaw opened this issue Nov 16, 2017 · 4 comments

Comments

@Eldaw
Copy link
Contributor

Eldaw commented Nov 16, 2017

For better clarity concerning whether a particular sort is going to be case sensitive or case insensitive, my suggestion is to rename the commands to something like this:

Sort lines (ascending, case sensitive)
Sort lines (ascending, case insensitive)
Sort lines (line length)
Sort lines (descending, case sensitive)
Sort lines (unique, case sensitive)
Sort lines (shuffle)

@Eldaw
Copy link
Contributor Author

Eldaw commented Nov 16, 2017

And then, further to this, it would be nice if there were also an additional 2 commands:

Sort lines (descending, case insensitive)
Sort lines (unique, case insensitive)

@Tyriar
Copy link
Owner

Tyriar commented Dec 15, 2017

👍 open to PRs

@Eldaw
Copy link
Contributor Author

Eldaw commented Dec 18, 2017

Thanks for merging my PR which takes care of part of this (i.e. the renaming of the commands which already exist). However, in doing some testing of the commands with their new names, I've discovered that the case insensitive sorting doesn't actually work as expected.

Take these 4 lines of text, for example:

AAA
aaa
AAA
aaa

If I use the TextFX plugin for Notepad++ to do an ascending, case insensitive sort of these lines, it leaves them exactly as they are (as expected). However, if I use this Sort Lines extension in VS Code and issue the command 'Sort lines (ascending, case insensitive)' then this happens:

aaa
aaa
AAA
AAA

which, of course, is not expected.

@wyckster
Copy link

I'd rather see "descending" removed as an attribute of each kind of sort, and just add a separate feature to "reverse the selected lines". So if I want to sort descending, I just sort ascending, then reverse the order of the lines with a second command.

The main reason I suggest this is so that you don't have an excessively large list of sort options. Otherwise there would be a variant for each case of flags as @Eldaw pointed out.

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

No branches or pull requests

3 participants