Hello,
I've made a macro that enclose the instructions if, for, while,...
For each of them, I've created a template.
Then, I created a macro :
I have to write the instruction and execute the macro just after.
It works when there is no tab character before the instruction. But if there is a TAB (or a whitespace), it doesn't indent the second line of the template. So it look like something like this :
Is there a way to align the second line with the first one ?
I would rather prefer to keep the template (i.e not to write all the snippets in the macro). Is it possible ?
Thank you in advance for your help.
mathmax
I've made a macro that enclose the instructions if, for, while,...
For each of them, I've created a template.
Then, I created a macro :
Code: Select all
HexOff
Key LEFT ARROW
SelectWord
Find "if"
Replace All SelectText "if"
IfFound
Template 0
Else
Find "case"
Replace All SelectText "case"
IfFound
Template 1
Else
Find "for"
Replace All SelectText "for"
IfFound
Template 2
Else
Find "while"
Replace All SelectText "while"
IfFound
Template 3
Else
Find "function"
Replace All SelectText "function"
IfFound
Template 4
Else
Find "procedure"
Replace All SelectText "procedure"
IfFound
Template 5
Else
Template 6
EndIf
EndIf
EndIf
EndIf
EndIf
It works when there is no tab character before the instruction. But if there is a TAB (or a whitespace), it doesn't indent the second line of the template. So it look like something like this :
Code: Select all
if ()
endif
I would rather prefer to keep the template (i.e not to write all the snippets in the macro). Is it possible ?
Thank you in advance for your help.
mathmax