#10087
zhouzh2
Participant

Hi user,
I wrote this macro for you:

document.selection.EndOfDocument(false);
endOfDocu = document.selection.GetActivePointY( eePosView );
document.selection.StartOfDocument(false);
document.selection.EndOfLine(false,eeLineView);
currentCursor = document.selection.GetActivePointY( eePosView );
while ( endOfDocu != currentCursor ) {
currentCursor = document.selection.GetActivePointY( eePosView );
numberOfChar = document.selection.GetActivePointX( eePosLogical ) - 1;
document.selection.StartOfLine(false,eeLineView | eeLineHomeText);
document.selection.Text=numberOfChar + ": ";
document.selection.LineDown(false,1);
document.selection.EndOfLine(false,eeLineView);
}

This macro will add numbers which indicate the number of characters of the line to the start of lines.
After that,you can use the “sort” of emeditor.
Than replace “^d+?:s” with NULL to restore orginial line.
Hope it helps. :-)

Cheers,
angus.