[TxMt] Odd behavior with "Move Selection Line Up" and "Line Down"

Paul McCann paul.mccann at adelaide.edu.au
Sun May 21 23:31:56 UTC 2006


Michael Henry wrote:

> When nothing is selected, invoking either "Line Up" or "Line Down"  
> from the Text | Move Selection menu will move the current line up  
> or down, which is exactly what I'd want it to do.  The unexpected  
> behavior is that the cursor doesn't remain on the moved line at the  
> original offset; instead, the cursor ends up at the start of the  
> line immediately below the moved line.  This makes it difficult to  
> move a given line more than one line up or down.

While not ideal, one way to get a partial solution to this is to  
override the "Line Up" and "Line Down" commands using macros.

Sselect "Automation => Start Macro Recording" then

(1) Select "Text => Move Selection => Line Up"
(2) Hit your up arrow

and finally select "Automation => Stop Macro Recording". Then use  
"Automation =>  Save Scratch Macro..." to save this as, say, "upline"  
with a blank scope and the same key command as "Text => Move  
Selection => Line Up". Repeat with obvious modifications for "downline".

This at least eliminates the major pain (cursor not staying on the  
switched line): you still manage to lose the column position, but for  
30 seconds work it's a big improvement.

Cheers,
Paul



More information about the textmate mailing list