Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>VSCode Shell-like FormatterNew to Visual Studio Code? Get it now.
VSCode Shell-like Formatter

VSCode Shell-like Formatter

lumirelle

|
6,865 installs
| (6) | Free
Revision of shell-format: A formatter for shell-like scripts, gitignore, dotenv, /etc/hosts, jvmoptions, and other file types
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Shell-like Formatter For VS Code

Visual Studio Marketplace Version

[!Note]

This is a fork of foxundermoon/vs-shell-format.

Since the original package no longer maintained, I just try to fork this package, fix this issue and re-publish new package to marketplace.

See https://github.com/foxundermoon/vs-shell-format/issues/396.

Get it on the VS Code Marketplace!

Enjoy shellscript!

Supported file types or languages

[!Caution]

Since v1.0, this extension drops the support for Dockerfile due to the limitation of upstream tool shfmt, see related PR for more details.

It's recommended to use another extension – Container Tools instead!

language extension describe
shellscript .sh .bash shell script files
ignore .gitignore .dockerignore ignore files
properties .properties java properties files
jvmoptions .vmoptions , jvm.options jvm options file
hosts /etc/hosts hosts file
bats .bats Bats test file
zsh .zsh .zshrc .zshenv zsh script files

screenshot

Usage

shift+option+f

shift+command+p then type Format Document

Dependencies

  • shfmt

Custom configuration

  • shellformat.path the shfmt fullpath example [mac,linux]: /usr/local/bin/shfmt [windows]: C:\\bin\\shfmt.exe
  • shellformat.flag shfmt -h to see detailed usage.

Links

Source code

shfmt (mvdan/sh)

Contributors of the original project

Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

Individuals

Organizations

Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]

Sponsors

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