Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Format On IdleNew to Visual Studio Code? Get it now.
Format On Idle

Format On Idle

Gruntfuggly

|
1,046 installs
| (0) | Free
Format the current file when you stop typing
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Format On Idle

This a very simple extension that enables formatting of the current file after a period of inactivity.

By default it is enabled for all file extensions (except files without extensions).

When the current file has an extension and an available formatter, a button is displayed in the status bar (a watch with a tick or a cross next to it) indicating if Format On Idle is enabled for the current file extension:

Click the button to disable or enable.

Once a file extension has been enabled or disabled, the state is stored in your settings and the extension will no longer be enabled for all file extensions.

Configuration

Use formatOnIdle.delay to change the delay after which the formatting is triggered. The value is specified in milliseconds. The default delay is 1 second.

formatOnIdle.enabled can be manually modified to set the state for specific file extensions.

The position of the status bar button can be configured using formatOnIdle.buttonAlignment and formatOnIdle.buttonPriority.

Installing

You can install the latest version of the extension via the Visual Studio Marketplace here.

Source Code

The source code is available on GitHub here.

Known Issues

Files without extensions are not considered.

Credits

Extension icon made by Freepik from www.flaticon.com is licensed by CC 3.0 BY

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft