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

nabbisen - Aug 3 '21 - - Dev Community

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

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .