Plugin: Sort Selected Lines

Browse, download and discuss plugins for Blumentals code editors

Plugin: Sort Selected Lines

Postby Aivars » Fri Feb 01, 2013 4:04 pm

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

Re: Plugin: Sort Selected Lines

Postby Aivars » Fri Feb 01, 2013 4:38 pm

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
User avatar
Aivars
Blumentals Software Developer
 
Posts: 2389
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia


Return to Plugins for HTMLPad / Rapid CSS / Rapid PHP / WeBuilder

Who is online

Users browsing this forum: No registered users and 2 guests

cron