> For the complete documentation index, see [llms.txt](https://docs.poshtools.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.poshtools.com/powershell-tools-documentation/visual-studio/settings/.editorconfig.md).

# .editorconfig

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](https://learn.microsoft.com/en-us/visualstudio/ide/create-portable-custom-editor-options?view=vs-2022).

## Spaces

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.

```editorconfig
# PowerShell files
[*.{ps1,psm1,psd1}]
indent_size = 6
indent_style = space
```

## Tabs

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

```editorconfig
# PowerShell files
[*.{ps1,psm1,psd1}]
indent_style = tab
```

## Adaptive Formatting

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

<figure><img src="/files/ZaoJeu1q2C3R2Kv9qvHv" alt=""><figcaption></figcaption></figure>
