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.
To remove leading and trailing spaces in Java, use the trim() method. This method returns a copy of this string with leading and trailing white space removed, or this string if it has no leading or trailing white space.
Hover the mouse on warning in VS Code or any IDE and use quick fix to remove white spaces. Press f1 then type trim trailing whitespace .
press F1 and select/type "Trailing Spaces: Delete"
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With