Two actions, to move the selected line(s) up or down by one line. Attempts to maintain the selection, so you can repeatedly trigger the actions for convenient line-movement.
They’re the same script, with just a boolean variable at the top toggled for the direction. There are probably some rough spots in terms of edge cases with blank lines; improvements welcomed.
Thanks for these actions! I’m getting a weird result when the selection includes the very end of a draft—the action pastes my clipboard for some reason.
In case it helps, if you have the ThoughtAsylum - Writing action group there are some actions for moving line selections up and down. If the actions above don’t meet your needs, perhaps they might be worth trying. They will move blank lines if part of the current line selection.
TAD-Move Line Selection Up.
Move the lines spanned by the curent selection up in the editor while retaining the existing selection.
TAD-Move Line Selection Down.
Move the lines spanned by the curent selection down in the editor while retaining the existing selection.