We've just created our own sort and applied it in the editor. If you'll press No, you'll be back to code window If you like sorting method you've done and you wanna save it, then press Yes. (We can change the sample text here, but we'll do it in the VS editor)) Press Yes to test your method directly in the pop-up window: The resulting function will look like this: We'll use Comparer function, since we can describe how the 2 elements of the collection relate to each otherĪlso we'll use Row type ( visit GitHub repo to see its structure), cause lines including the numbers can contain whitespace-symbols we don't need, but they must be returned to the previos place аfter sorting. Using Empty Lines combobox you can choose the type of processing empty lines.Using 'T' is combobox you can select generic type of collection to be sorted.Using Function type combobox you can select implementation you like.Using Language combobox you can select language you like ( C# or Visual Basic).Navigate Context Menu => LineSorter => Add custom sortĪfter that the following window will appear: Using next rule: numbers are sorted in ascending order, and all strings follow the numbers and are sorted alphabetically Imagine that you want to sort these lines: -200 Now users has the opportunity to create their own sorting method! Shuffle result (1 in N): using System.Numerics Sort lines by length (desc) result: using Sort lines by length result ( shortcut: (CTRL + E) + (CTRL + L)): using Antlr4 Sort lines alphabetically (desc) result: using System Sort lines alphabetically result ( shortcut: (CTRL + E) + (CTRL + A)): using If you have any questions, don't hesitate to drop me a mail!)Įxample situation using Note: PayPal takes a fee of 1.2% + 0.35€ per donation If you like LineSorter or my other extensions, you can support my projects via PayPal donation: Simply select the lines you wanna sort in the editor, then navigate Context Menu => LineSorter and select the sorting mode you need An extension that allows you to sort rows by different criteria
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |