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

CSVSort using lexical sorting with decimal points #59

Closed
jungle-boogie opened this issue Jun 15, 2015 · 9 comments
Closed

CSVSort using lexical sorting with decimal points #59

jungle-boogie opened this issue Jun 15, 2015 · 9 comments

Comments

@jungle-boogie
Copy link
Contributor

Hello,

Gist here with data: https://gist.github.com/jungle-boogie/f899acae799359f20711

Sorting is doing it like 900, 800, 8, 700 which results in four digit numbers being incorrectly sorted.

Thanks,
jungle

@jungle-boogie
Copy link
Contributor Author

By the way, this will also affect values that contain decimal values.

96.21
9.95
8.75
8.65
8.05
8
77.52
70.75
7.85
7.70
7.20
7.10

@chrisbra
Copy link
Owner

That should alreadyy work, when you give the :Sort function the 'n' flag.

@jungle-boogie
Copy link
Contributor Author

Hello,

That should alreadyy work, when you give the :Sort function the 'n' flag.

Yes, this is correct! That's wonderful.

Thanks,
Jungle

@jungle-boogie
Copy link
Contributor Author

I may have closed this a bit too soon, sorry.

If you take my small sample above and :Sort! n, the results:

96.21
77.52
70.75
9.95
8.75
8.65
8.05
8
7.85
7.70
7.20
7.10
numbers

If I make that 8 read 8.00, it will sort correctly:
96.21
77.52
70.75
9.95
8.75
8.65
8.05
8.00
7.85
7.70
7.20
7.10
numbers

@jungle-boogie jungle-boogie changed the title CSVSort using lexical sorting CSVSort using lexical sorting with decimal points Jun 15, 2015
@chrisbra
Copy link
Owner

Am 2015-06-15 08:00, schrieb jungle-boogie:

I may have closed this a bit too soon, sorry.

If you take my small sample above and :Sort! n, the results:

96.21
77.52
70.75
9.95
8.75
8.65
8.05
8
7.85
7.70
7.20
7.10
numbers

If I make that 8 read 8.00, it will sort correctly:
96.21
77.52
70.75
9.95
8.75
8.65
8.05
8.00
7.85
7.70
7.20
7.10
numbers

I don't see a difference in the ordering.

@jungle-boogie
Copy link
Contributor Author

Hello,

I don't see a difference in the ordering.

You're right, I don't either. I don't know what I was observing so it looks fine!

Thanks a million for the plugin!

@jungle-boogie
Copy link
Contributor Author

Hello,

So this is a problem...

Sort think this is correct:
PF
PG
PP
PQ
Pacific

Pacific should because before all others.

@chrisbra
Copy link
Owner

Hi jungle-boogie!

On Mo, 15 Jun 2015, jungle-boogie wrote:

Hello,

So this is a problem...

Sort think this is correct:
PF
PG
PP
PQ
Pacific

Pacific should because before all others.

Try the 'i' flag to the :Sort command

Best,

Christian

Freude beruht auf dem frohen Glauben, daß das Gute überwiegt.

@jungle-boogie
Copy link
Contributor Author

Hi Christian,

Try the 'i' flag to the :Sort command

You have everything figured out! That worked. I'll just have to keep track of these options.

Thanks,
Sean

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

No branches or pull requests

2 participants