Code Aligment and Resharper 10 together in VS 2015
Answered
Hi,
I am currently evaluating Resharper.
I read of people using the extension "Code Aligment" and Resharper together. However I cannot find an option to prevent Reshparper from removing extra spaces in declarations.
Simplest case, this:
[Inject] public InputController inputController { private get; set; } [Inject] public ICommandFactory commandFactory { private get; set; } [Inject] public NetworkMachineManager machineManager { private get; set; }
always becomes this after clean up:
[Inject] public InputController inputController { private get; set; } [Inject] public ICommandFactory commandFactory { private get; set; } [Inject] public NetworkMachineManager machineManager { private get; set; }
is there any way to keep the alignment, but not loosing the other formatting features?
Please sign in to leave a comment.
Hello Sebastiano
You may try disabling auto-format here:
- ReSharper | Options | Environment | Editor | Editor Behavior | "Auto-format on semicolon" and "Auto-format on closing brace" checkboxes.
However, if you run R# Cleanup Code, it will be re-formatted anyway, since R# does not support such formatting style.
Thanks!
thanks! Is it something you may consider to add in future? It's a shame to disable the auto format features just for this reason. I guess it would be simple to detect the case for you?
Feel free to vote for https://youtrack.jetbrains.com/issue/RSRP-452862 feature request.
Thanks!
great! thanks a lot.