DEV Community

nabbisen
nabbisen

Posted on • Edited on

1 1

VS Code: Built-in Formatter for .js / .ts / .json / .html

As Visual Studio Code says in its website:

VS Code has has default formatters for JavaScript, TypeScript, JSON, and HTML.

The keyboard shortcut:

[Ctrl] + [Shift] + i

brings formatted text. Like this :)

vscode formatter

It aims to format the whole text in file.
Well, there is also part formatter on selected text. The keyboard shortcut is:

[Ctrl] + k then [Ctrl] + f

vscode formatter

Top comments (0)

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay