PowerShell spacing option between type and name

Post feature requests, product enhancement ideas, and other product-specific suggestions here. Do not post bug reports.
Forum rules
Do not post any licensing information in this forum.
Post Reply
User avatar
JohnMoe
Posts: 18
Meble kuchenne na zamówienie - na wymiar - Wrocław
Joined: Sun Apr 15, 2018 11:36 pm

PowerShell spacing option between type and name

Post by JohnMoe »

Currently, when I define a variable like this:

Code: Select all

[System.String] $myString
PowerShell Studio keeps "correcting" it to:

Code: Select all

[System.String]$myString
In my view, this mashes it together and makes it less readable. Can you please add a spacing option to leave that space?

User avatar
Alexander Riedel
Posts: 7344
Joined: Tue May 29, 2007 4:43 pm

Re: PowerShell spacing option between type and name

Post by Alexander Riedel »

It is actually very common practice to 'mash', as you say, the type specifier and the object or variable together like that. In almost every language I know.
My personal opinion is that this actually enhances readability, since it makes the type cast stand out.
But I will of course forward your request to the team.
Alexander Riedel
SAPIEN Technologies, Inc.

Post Reply