Hi guys,
Here is a macro that indents lines exactly the same as the line before and automatically jumps down one line.
It is quite good if you have flattered-structures like this:
to end 'em up like that:
Bind the macro to a key, e.g. alt-^
Format the 1st line in the block as you like it (here: 3 spaces)
Goto to the second line of the block and press alt-^ 3 times.
You see that all lines in the block are indented with 3 spaces
One limit: It does NOT work correctly if the line before starts at column 1.
(Maybe s.o. has a solution without a 2nd macro because of loop-nesting-problem)
Maybe you like it, otherwise, ignore it.
Improvements and comments are welcome.
rds Bego
The Macro KEY_HOME looks like this and ensures that - whatever settings in UE you set - the cursor surely is at the beginning of the line.
A Key Home is enough, if your setting "always position Key Home at col 1" is set.
Here is a macro that indents lines exactly the same as the line before and automatically jumps down one line.
It is quite good if you have flattered-structures like this:
Code: Select all
if i < 1 then
only2Spacesbefore = 3
tabAndSpacesBeforeMe = 2
Just a tab before me !
2 tabs before me :-(
end if
Code: Select all
if i < 1 then
only2Spacesbefore = 3
Just a tab before me !
2 tabs before me :-(
end if
Format the 1st line in the block as you like it (here: 3 spaces)
Goto to the second line of the block and press alt-^ 3 times.
You see that all lines in the block are indented with 3 spaces
One limit: It does NOT work correctly if the line before starts at column 1.
(Maybe s.o. has a solution without a 2nd macro because of loop-nesting-problem)
Maybe you like it, otherwise, ignore it.
Improvements and comments are welcome.
rds Bego
Code: Select all
InsertMode
ColumnModeOff
HexOff
UnixReOn
Clipboard 9
ClearClipboard
Key UP ARROW
Key END
IfColNumGt 1
PlayMacro 1 "KEY_HOME"
StartSelect
Find RegExp "\S"
Key LEFT ARROW
EndSelect
Copy
EndIf
Key DOWN ARROW
Key END
IfColNumGt 1
PlayMacro 1 "KEY_HOME"
StartSelect
Find RegExp "\S"
Key LEFT ARROW
EndSelect
Paste
EndIf
Key DOWN ARROW
Clipboard 0
A Key Home is enough, if your setting "always position Key Home at col 1" is set.
Code: Select all
Key HOME
IfColNumGt 1
Key HOME
EndIf
Normally using all newest english version incl. each hotfix. Win 10 64 bit