Z-A ↑
Descending sort of selected lines

Script key: Descending sort of selected lines

Posted by @complexpoint

Install

Details

Label Z-A ↑
Voice Over Descending sort of selected lines
Script
// simple DESCENDING alphabetic sort of 
// all fully or partially selected lines

var	rngLines = getSelectedLineRange(),
	iFrom=rngLines[0], iTo=rngLines[1],
	strSorted =
		getTextInRange(
			iFrom, iTo
		).split('\n').sort().reverse().join('\n');

setTextInRange(iFrom, iTo, strSorted);

Advanced

Keyboard shortcut None
Hide key Yes

Discussion

comments powered by Disqus