Notepad ++ Line operations for sort.
- Get link
- X
- Other Apps
In Notepad++, you can perform various types of line sorting operations. Here’s an explanation of each sorting method with examples of input and output:
1. Sort Lines Lexicographically Ascending
This sorts lines alphabetically based on character-by-character comparison. Uppercase letters come before lowercase letters in ASCII, so sorting is case-sensitive.
Example Input:
Banana apple Cherry banana
Output:
Banana Cherry apple banana
-----------------------------------------------------------
2. Sort Lines Lexicographically Ascending (Ignoring Case)
This sorts lines alphabetically, but it ignores the case of the letters. So uppercase and lowercase are treated equally.
Example Input:
Banana apple Cherry banana
Output:
apple Banana banana Cherry
------------------------------------------------------------------
3. Sort Lines as Integers Ascending
This treats the lines as integer numbers and sorts them from smallest to largest.
Example Input:
10 3 25 7
Output:
3 7 10 25
-----------------------------------------------------------
4. Sort Lines as Decimals (Comma) Ascending
This sorts lines as decimal numbers where the decimal separator is a comma.
Example Input:
2,5 0,75 1,25 10,1
Output:
0,75 1,25 2,5 10,1
------------------------------------------------
5. Sort Lines as Decimals (Dot) Ascending
This sorts lines as decimal numbers where the decimal separator is a dot.
Example Input:
2.5 0.75 1.25 10.1
Output:
0.75 1.25 2.5 10.1
----------------------------------------------------------
6. Sort Lines Lexicographically Descending
This sorts lines alphabetically in reverse order, with uppercase letters coming before lowercase.
Example Input:
Banana apple Cherry banana
Output:
banana apple Cherry Banana
----------------------------------------------
7. Sort Lines Lexicographically Descending (Ignoring Case)
This sorts lines alphabetically in reverse order while ignoring the case of the letters.
Example Input:
Banana apple Cherry banana
Output:
Cherry banana Banana apple
---------------------------------------------------
8. Sort Lines as Integers Descending
This treats the lines as integers and sorts them from largest to smallest.
Example Input:
10 3 25 7
Output:
25 10 7 3
9. Sort Lines as Decimals (Comma) Descending
This sorts lines as decimal numbers with commas, from largest to smallest.
Example Input:
2,5 0,75 1,25 10,1
Output:
10,1 2,5 1,25 0,75
-------------------------------------------------------------
10. Sort Lines as Decimals (Dot) Descending
This sorts lines as decimal numbers with dots, from largest to smallest.
Example Input:
2.5 0.75 1.25 10.1
Output:
10.1 2.5 1.25 0.75
---------------------------------------------------
How to Use in Notepad++:
- Select the text you want to sort.
- Go to Edit → Line Operations.
- Choose the appropriate sorting method:
- Sort Lines Lexicographically Ascending/Descending
- Sort Lines Lexicographically Ignoring Case
- Sort Lines as Integers Ascending/Descending
- Sort Lines as Decimal Number Ascending/Descending (Dot/Comma)
This way, you can easily organize data depending on your needs in Notepad++.
- Get link
- X
- Other Apps