User Rating: 3 / 5

Star ActiveStar ActiveStar ActiveStar InactiveStar Inactive
 

Often times when you paste a PowerShell script from the web, the lines aren’t indented correctly. With the PowerShell Studio’s code formatting, it will automatically indent your script.

initial unformated script

Formatted After Paste:

automatically indent your script

 

Customizable Formatting:

PowerShell Studio’s code formatting is customizable to fit your needs:

customizable code formattting

Formatting Triggers:

The first few options serve as triggers for auto formatting. These options tell PowerShell Studio when to format your script.

options serve as triggers for auto formatting

The following triggers can be enabled:

  1. When a user inserts a new line ie. presses Enter (Formats the line only).
  2. When a script block is completed by typing the closing curly bracket }  (Formats the code block).
  3. When a user types a semicolon ; (Formats the line only).
  4. When a user pastes text into the editor (Formats the pasted content).

In addition, there is an option to automatically indent the appropriate tab depth when inserting a new line.

Formatting Rules:

The second set of options allow you to customize the formatting rules of PowerShell Studio.

Place open brace on new line:

Enabled
Place open brace on new line: Enabled

Disabled
Place open brace on new line: Disabled

Place statement keyword on newline:

Enabled (with open brace new line: disabled)
Place statement keyword on newline: Enabled (with open brace new line: disabled)

Disabled (with open brace new line: disabled)
Place statement keyword on newline:  Disabled (with open brace new line: disabled)

Align parameter on line continue `:

Enabled
Align parameter on line continue `: Enabled

Disabled
Align parameter on line continue `: Disabled

Parameter Block Indent:
Indents the parameter declarations within a parameter block.

Indent: 1
Parameter Block Indent: 1

Indent: 0Parameter Block Indent: 0

Align parameter attributes:
Vertically aligns a parameter’s attributes declarations. When disabled it uses the Attribute Parameter indent value instead, to indent the subsequent lines of attributes.

Enabled
Align parameter attributes: Enabled

Disabled with Indent: 1
Align parameter attributes: Disabled with Indent: 1

 

If you have any suggests or formatting options you would like to see added, please post a comment in our Wish List and Features Request forum.

If you have questions about our products, please post in our support forum.
For licensed customers, use the forum associated with your product in our Product Support Forums for Registered Customers.
For users of trial versions, please post in our Former and Future Customers - Questions forum.
Copyright © 2024 SAPIEN Technologies, Inc.