Question

How can you do a case-insensitive sort in recent versions of Notepad++ (i.e. >= 6.5)?.

I'm aware of the old way of using TextFX, however Notepad++ now has the built-in "Line Operations", but these seem to be case sensitive.

Was it helpful?

Solution 2

Current versions now support this out of the box (tested with 7.9.1):

enter image description here

OTHER TIPS

You can still use the TextFX Characters plugin in recent versions of Notepad++ (tested under version 6.5.5):

  • Click Plugins/Plugin Manager/Show Plugin Manager
  • Under Available find TextFX Characters
  • Click Install
  • Select rows to be sorted.
  • Click TextFX/TextFX Tools
  • Check or uncheck Sort ascending
  • Sort lines case insensitive

Since N++ is trying to sort a text file, you can just save the file and use the SORT command in a DOS window; then just re-open the sorted file with N++ .

For help with the SORT command in a DOS window, type either of the following:
SORT /?|MORE HELP SORT|MORE

2019Feb25 (JoeG314)

Case insensitive sorting is not supported in Notepad++. TextFX is not supported in recent x64 Notepad++, but will work for this in other versions.

Here's a convoluted workaround for most cases:

  1. Load and enable the "elastic tabstops" plugin, if necessary.
  2. Add a tab character at the end of each line (search/replace).
  3. Copy the file as a column (Alt-drag).
  4. Paste the column at the beginning of the file (duplicating each line horizontally, separated by a tab).
  5. Select the left column, and from the Edit menu, Convert Case to, lowercase.
  6. Do a Lexicographic Sort from the Edit menu.
  7. Select and delete the left column.
  8. Delete leftover tab characters.

Alternatively, you can copy and paste into something like Excel, sort, and copy back.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top