Sort

Posted by agiletortoise, Last update 30 days ago

Sort lines in alpha order.

Steps

  • script

    // Alpha sort selected lines.
    
    var lnRange = editor.getSelectedLineRange();
    var ln = editor.getTextInRange(lnRange[0],lnRange[1]);
    
    var lines = ln.split('\n').sort();
    editor.setTextInRange(lnRange[0],lnRange[1],lines.join('\n'));
    

Options

  • After Success Default
    Notification Error
    Log Level Error
Actions available in the Action Directory are uploaded by community members. Use appropriate caution reviewing downloaded actions before use.