2011
11.11

I’ve created a fix for single line if, while, and for statements, and adding a space between ){ for bracketed statement blocks.

There’s a Macro to run codeformatter, then execute the script, and relocate you back to the original cursor position.

If you find a bug post the test case and I’ll get around to it when I can :)

Macro Setup — CTRL+SHIFT+(~ or `)
AutoRun: False

Shortcut: Ctrl+Shift+Oemtilde

Entries:

InvokeMenuItem|RefactorMenu.CodeFormatter
InvokeMenuItem|RefactorMenu.OrganizeImports
ExecuteScript|Internal;C://pathto//fixifstatements.cs

** Make sure to change the path (C://pathto//fixifstatements.cs) to the correct location of the script! **

Script code is here: http://pastebin.com/Qt5W73mR

Hope this eases some minds :D

blog comments powered by Disqus