The advanced sort options allow you to configure sort options and sort the file (or selection, if it exists). If in column mode, all of the selected lines are sorted, not just the selected columns.
The options you set here are saved between sessions, and are used by the Sort command. You can click the Reset to defaults button to reset all sort options below to their factory defaults.
This sets the sort for ascending order ('a' to 'z', 0-9) and is the default.
This sets the sort for descending order ('z' to 'a', 9-0).
If this checked, then the associated radio button options Where all selected keys match and Where any selected keys match become active and may be selected.
Where all selected keys match
If selected, duplicate strings/characters must exist in ALL active sort keys for a line to be considered a duplicate and be removed.
Where any selected keys match
If selected, a line is considered a duplicate if duplicate strings/characters exist in ANY of the active sort keys.
You can designate active keys using the checkboxes under the RD heading in the "Sort columns" group. This allows you greater flexibility in determining which keys are used for the Remove duplicates sort operation.
If this is checked, case is not evaluated when sorting lines. This option should be checked if you want the search to be insensitive to case, i.e. "CAT" is considered the same as "cat". Do not check this option if the sort should consider "CAT" different than "cat".
Typically a sort is non-numeric and the values 1,11,111 would be sorted before 2,22,222 as 1 comes before 2. If this option is checked, however, the values would be sorted in numeric order (1,2,11,12,111,222). This option should only be used with numeric characters. Numeric sort is not available with Use locale (slower) checked.
If checked, the sort is based on fields separated by tabs in the active file instead of column positions. When checking this option, you will see the "Sort columns" options change from "Start column" and "End column" to "Field," "Start character," and "End character."
The following rules apply with tab delimited sort:
You can set up to 4 sort keys to be used in the sort. Each sort key contains a range of columns that will be evaluated for the the sort. The default value for the first sort key is from column 1 to -1, which is the entire line. If any key is set to sort the entire line, the rest of the sort keys will be ignored.
A value of -1 represents the end of each line. This is useful if you are sorting lines of variable length, but still want to evaluate each line in its entirety. Because of this, -1 should only ever be used for the "End column" value.
A value of 0 represents the current caret position in the active file.
The start and end columns for unused keys should be set to 0.
If multiple keys are used, the sort order is based on the first key, followed by the second key, etc.
Sorting performance is directly related to the number of keys / columns used in the sort. As more keys are added to the sort, the processing time required to complete the sort will increase.
If the "RD" checkbox is checked, the associated sort key is evaluated when remove duplicates is checked.
If checked, this will make the sort locale-specific. For some languages (e.g. German) this is necessary for special alphabet-specific characters (e.g., umlauts). The locale used is the same as the one set in Set code page/locale in the Advanced tab. Locale-specific sorting may require more processing time to complete the sort.