Editorconfig support for PowerShell Tools for Visual Studio

PowerShell Tools for Visual Studio supports .editorconfig files. You can include these files in your PowerShell projects to control aspects of the editor based on the file.

More information on editor config files here.


To control the number of spaces inserted when pressing tab, you can create a .editorconfig file like the following. This will insert 6 spaces per tab.

# PowerShell files
indent_size = 6
indent_style = space


You can choose to insert tabs by setting the indent_style to tab.

# PowerShell files
indent_style = tab

Adaptive Formatting

Adaptive formatting may change the format of your document. Disable it to ensure that your .editorconfig file is honored.

Last updated