# .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>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.poshtools.com/powershell-tools-documentation/visual-studio/settings/.editorconfig.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
