Reputation: 16598
I have this:
public void Scale(float amount);
But I want this:
public void Scale( float amount );
Best would be if I could apply a rule to existing C#
files as well.
Upvotes: 6
Views: 334
Reputation: 53
You can enable whitespace from below settings:
VS
1.Open VS Text Editor(Tools=>Options=>Editor)
2.Choose your language.For example(C#->Formatting->spacing)
3.Then tick up Insert space within argument list parentheses
VS Code:
1.Open VS User Settings (File > Preferences > User Settings).
2.Add a new "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": true,
setting to the User Settings document on the right if it's not already there.
3.Save the User Settings file.
4.In the toolbar in the bottom right corner you will see an item that looks like the following:
5.After clicking on it you will get the language list and select TypeScript.
6.Press Shift+ Alt+ F
Upvotes: 3