cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Sat May 14, 2011 6:40 pm Post subject: Indent, Outdent for If Statements |
|
|
I don't like the way tab works in the IDE. It's 'iffy'.
When I beautify code (only on large projects) I use four space indenting.
Compile and place in your tools folder.
Indent
Code: | window send,@winactive(),@ctrl(c)
list create,1
list paste,1
list create,2
list seek,1,0
repeat
%a = @item(1)
list add,2," "%a
until @null(@next(1))
clipboard set,@text(2)
window send,@winactive(),@ctrl(v) |
Outdent
Code: | window send,@winactive(),@ctrl(c)
list create,1
list paste,1
list create,2
list seek,1,0
repeat
%a = @substr(@item(1),5,@len(@item(1)))
list add,2,%a
until @null(@next(1))
clipboard set,@text(2)
window send,@winactive(),@ctrl(v) |
|
|