markedit-sort-text source on GitHub

Put your lines in order.

Sort Text adds two commands to MarkEdit’s Extensions menu that sort lines alphabetically — case-insensitive, locale-aware, and numeric-aware.

groceries.md
Add to MarkEdit requires MarkEdit 1.34+ · relaunch after install

what it does

  • Sort Lines A → Z  ·  Sort Lines Z → A

    Both act on the selected lines, or the whole document when nothing is selected.

  • Case-insensitive: apples sorts with Bananas, not after them.
  • Numeric-aware: item2 comes before item10.
  • Locale-aware: Éclairs sorts with e.
  • Selections expand to whole lines; multiple selections sort independently.
  • A whole sort is one undo step — ⌘Z restores everything.

install from a url

  1. Copy the extension URL:
  2. In MarkEdit, open the Extensions window and choose Actions → Install from URL…
  3. Paste the URL and confirm the install.
  4. Relaunch MarkEdit — Sort Text appears in the Extensions menu.
Install by copying the file instead

Every MarkEdit user extension is a single .js file in the app’s sandboxed scripts folder. Download markedit-sort-text.js and copy it there, then relaunch:

cp markedit-sort-text.js ~/Library/Containers/app.cyan.markedit/Data/Documents/scripts/