Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>ENVNew to Visual Studio Code? Get it now.
ENV

ENV

Jakka Prihatna

|
744,816 installs
| (12) | Free
Adds formatting and syntax highlighting support for env files (.env) to Visual Studio Code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

ENV

GitHub build GitHub release (latest by date) GitHub package.json version Visual Studio Marketplace Version GitHub

Adds formatting and syntax highlighting support for env files (.env) to Visual Studio Code

Features

  • Syntax highlighting

    Syntax highlighting

  • Folding

    The extension will enable folding on file content that are wrapped with the following pattern:

    # ...       << begin with comment(s)
    ...
    ...         << folded content
    ...
                << end with a blank line
    

    Folding

  • Formatting

    Use the Format Document command (CTRL+SHIFT+I) from the Command Pallete (CTRL+SHIFT+P) to format the current env file

    Formatting

Custom env file extension

The extension support env files with the following name:

  • .env
  • .env.sample
  • .env.example

To enable support for other env files with specific naming convention/ file extension, use the files.associations settings in Visual Studio Code.

For example, the following settings will enable support for *.env.development and *.env.production files:

  "files.associations": {
    "*.env.development": "env",
    "*.env.production": "env"
  }

Acknowledgements

  • Mike Stead for dotenv extension for vscode

License

This project is licensed under the terms of the MIT license.

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