Plugin: Sort Selected Lines

Browse, download and discuss plugins for Blumentals code editors
Post Reply
User avatar
Aivars
Blumentals Software Developer
Posts: 2462
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Plugin: Sort Selected Lines

Post by Aivars »

This plugin sorts selected lines alphabetically in ascending order.
Attachments
sort selected lines.zip
(504 Bytes) Downloaded 703 times
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
Posts: 2462
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Plugin: Sort Selected Lines

Post by Aivars »

Here's plugin code if you want to use it as an example:

Code: Select all

function SortLines(Sender) {
  var SL = new TStringList;
  SL.Text = Editor.SelText;
  SL.Sort;         
  Editor.SelText = SL.Text;
  delete SL;
}

Script.RegisterDocumentAction("", "Sort Selected Lines", "", &SortLines);
Blumentals Software Programmer
Post Reply