Improved Ergonomics in the Text Substitution Preference Pane

Currently, it appears that Text Substitutions are initially sorted by their “native” order, matching what is stored in:
~/Library/Application Support/Script Debugger 8/Text Substitutions.plist.

However, clicking on one of the column headers in the table view will sort them by:

  1. ... (whether the replacement is enabled)
  2. Replace (alphabetically by the text to replace)
  3. With (alphabetically by the replacement text)

After one of these headers is clicked, there doesn’t appear to be official way of going back to the “native” order. This is my preferred sort order, since it allows for logical groupings of substitutions.

After some digging, I eventually found that I can restore the native order by editing Script Debugger’s defaults store, but obviously this is far from ideal:

defaults delete com.latenightsw.ScriptDebugger8 "NSTableView Columns v3 ASTextSubstitutions"
defaults delete com.latenightsw.ScriptDebugger8 "NSTableView Sort Ordering v2 ASTextSubstitutions"
defaults delete com.latenightsw.ScriptDebugger8 "NSTableView Supports v2 ASTextSubstitutions"

This appears necessary even if you make manual changes to the Text Substitutions through the GUI or by directly editing the plist, since Script Debugger still remembers the last sorted column.


It would be great if one or both of the following features could be added to a future version of Script Debugger:

  1. A way to (re-)sort the substitutions natively in the GUI. This could hopefully be as simple as displaying a column that has the index of the substitution, allowing the column header to be clicked.

  2. An easier way to change the order of substitutions within the GUI, by allowing clicking & dragging. Currently, the only way to do this within the GUI is to delete & re-insert at specific points.

    This one may be more work to implement & is less important, since it can be done with a plist editor (provided the GUI is showing the substitutions in native order). Just thought I’d add it in for posterity.