Sorting Text

From Notepad++ Wiki
Jump to: navigation, search
Sorting lines with plugin TextFX

Sorting text in Notepad is provided by the "TextFX" plugin, and is found on the menubar under "TextFX | TextFX Tools" (at least this is where it appears on MS Windows). On this menu, you will probably find that "+Sort ascending" has a check mark by it. The establishes the sort order as "ascending".

To sort your text:

  1. From menu: TextFX | TextFX Tools and select one of the following:
    1. clear the check mark for option "+Sort ascending" to sort descending order.
    2. enable the check mark for option "+Sort ascending" to sort ascending order.
  2. Select the text, either lines of text or columns (see below for column mode select).
  3. From menu: TextFX -> TextFX Tools -> {menu_cmd} where you select for {menu_cmd} one of the two commands at the top of the menu bar; that is, either:
    1. "Sort lines case sensitive (at column)"
    2. "Sort lines case insensitive (at column)"

TextFX Tools will sort only the lines you select. If you do a column mode select (Hold Shift + Alt keys down and select text via mouse), then it will sort all the lines that are at least partly selected, but will sort them according to the selected part.

The option "+Sort outputs only UNIQUE (at column) lines" can be checked independent of "+Sort ascending" option (meaning it will work in either ascending or descending mode). When enabled, duplicate entries will be removed when sorting, leaving only unique entries.

When using a rectangular selection, the sort key for a line is the part of that line that is within selection bounds.

This content written using v4.0.2 of Notepad++