In the Semware editor TSE there was a macro which I liked a great deal, which copied the character in the line above the cursor to the insert point.
The SAL macro code - for the Mofi's of the world who understand SAL - goes like this:
I have this assigned to Alt+Up in TSE like this:
It is a much-loved macro with a natural feeling key assignment, which I'd like to port into UE, but before I reinvent the wheel, is there already something for this in UE... and is this better in a macro or script?
The SAL macro code - for the Mofi's of the world who understand SAL - goes like this:
Code: Select all
integer proc mCopyCharAbove()
integer c,sv = Set(RemoveTrailingWhite,OFF)
PushPosition() /* Save position */
c = iif(up(),CurrChar(),-1) /* Try for char on line above */
PopPosition() /* Back to where we were */
Set(RemoveTrailingWhite,sv)
return(c >= 0 and InsertText(Chr(c)))
end mCopyCharAbove
Code: Select all
<Alt CursorUp> mCopyCharAbove()