Disable Visual Studio's insertion of single space before closing parenthesis in C#

Viewed 639

Question

I'm using Visual Studio 17 and my name is Emo.

When a man types the following into a .cs file:

new int[]{1

...and then types the closing parenthesis, an unwanted space is inserted, yielding:

new int[]{1 }

I spend a fair amount of time cleaning up these unwanted spaces. How do I prevent this autoinsertion from occurring?

All spacing is turned off in Options

For ye to visit the screen that lives within Tools >> Options >> C# >> Code Style >> Formatting >> Spacing, it is clear that all "Insert Space Before" and "Insert Space After" are turned off. Behold all options on this screen are unchecked.

Editor Config and csharp_space_between_parentheses

The newness of the thing does prevent myself from fully understanding the editor config file's purpose and it's precedence for the thing, but alas, I have uncovered an article here which makes mention of a special recipe known as csharp_space_between_parentheses. But again I am unable to use it.

Following the instructions indicated within a webpage known to us here, one might learn that with such a file, one of the following lines should solve the problem:

csharp_space_between_parentheses = none
csharp_space_between_parentheses = false

And yet again, neither of these lines solves the problem when embedded within the newly created file that people like to call .editorConfig that was added to the root of the project folder. Indeed, the problem persists.

We would truly appreciate your solve in this matter.

1 Answers
Related