vscode format on save code example
Example 1: how to format json file in vs code
On Windows Shift + Alt + F.
On Mac Shift + Option + F.
Example 2: autoformating for code in vscode when i save it
"editor.formatOnSave": true
Example 3: vscode autoindent on save
Use [Ctrl]+[Shift]+[p]
Type "Preferences"
Select "Preferences: Open User Settings"
Search for "format"
Change "Editor: Format On Save" or "Editor: Format On Paste".
Example 4: prettier on save vscode
{
"folders": [],
"settings": {},
"editor.formatOnSave": true,
}
Example 5: prettier on save vscode
// Set the default"editor.formatOnSave": false,// Enable per-language"[javascript]": { "editor.formatOnSave": true}
Example 6: enable prettier vscode
ext install esbenp.prettier-vscode