Sorting a List

sort.png StrongED can sort either a marked block or an entire text. To sort such a list, mark the block to be sorted (if that is required) then press Menu in the text. Fron the menu that opens, Sort is in the Edit sub-menu. Click Select on the Sort entry or slide the cursor to the right and the sort dialog box will open as shown right.

The function is block sensitive, so if the caret is inside a complete marked block, then Block will be pre-selected, otherwise Text will be pre-selected. A complete marked block is one ending with an end of line character.

The area to be sorted must end with a newline. This means that only entire lines should be selected. As a consequence, when the scope is 'Text' then the last line in the text must end with a newline character. However StrongED issues later than 4.70a13 will have this behaviour altered

If there is no newline character at the end of the selectred block then an error message will be given: You must select a whole number of lines to sort.

There is a slight difference if you have Block-sope in List of Found ticked: if so then if the block ends inside a line and the caret is within the marked block, the error will be given whilst if unticked then the sort will default to a whole text sort. Iconbar menu -> Choices -> Block -> Block-scope in List of Found

The options in the Sort dialog box are self-explanatory. If you wish to experiment, a suitable text file is available. This has duplicate lines and there is no end-of-line character at the end of the text.

Was this page helpful? Please email me and/or rate this page:


If you want a reply make sure any email address @torrens.org will not get spam-binned!
Optional comment

Other relevant pages

Top of page


Page Information

http://css.torrens.org/valid-html401-bluehttp://css.torrens.org/valid-css Document URI: http://stronged.torrens.org/man/sort/sort.html
Page first published 29th of January, 2020
Last modified:Sat, 08 Feb 2020 12:44:31 GMT
© 2020 - 2023 Richard Torrens.