Shuffle text lines
-
Hello,
Notepad++ can nicely sort text lines ascending or decending. What I was looking for is a functionality to shuffle text lines.
Did I just see it in np++? Or is there a plugin available that does this job?
Maybe by using something like this: https://en.wikipedia.org/wiki/Fisher–Yates_shuffleThank you and have a nice day
-
@Michael-Weet said in Shuffle text lines:
shuffle text lines
Welcome to the NPP forum. I first have to say your sentence “nicely sort lines ascending or descending” contradicts the request to “shuffle” especially when the link refers to a random sort.
You should be aware that an ascending or descending sort can easily be done with “Line Operations” which is under the “Edit” menu. However random sorts aren’t possible in NPP without additional help from plugins or one of the supporting programming languages.
Might I suggest you read the posts:
https://community.notepad-plus-plus.org/topic/16318/sorting-lines-evenly-in-document
as that might give you some direction.As a very rough simile to “randomness” considering grabbing 2 characters at different positions within each line, copying these to the start of the line, then sorting. Then those characters could be removed, thus leaving a “sort-of” random ordering of the lines.
Terry
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login