Emacs: Sort Lines

By Xah Lee. Date: .
Alt+x sort-lines
Sort lines in text selection.
Alt+x reverse-region
Reverse lines order in text selection.
Alt+x sort-numeric-fields
Sort lines by a specific column, as number. For example: Type Ctrl+u, then 2, then Alt+x sort-numeric-fields. This will sort the line by the 2nd column, and the fields are compared as numbers.
Alt+x sort-fields
Sort lines by a specific column, as string. (“fields” are separated by space or tabs. First field is 1.)

Emacs Tutorial

Quick Start

Font

Split Window

File

Buffer

Find Replace

Copy/Paste

Unicode

Whitespace

Rectangle Edit

Line Wrap

Shell

View Special File

Editing Brackets

Org Mode

HTML

Emacs Efficiency

Misc