This is a quick tip on how to format (prettify) the code every time you save a file in Visual Studio Code.
The first step is to go to Settings, this can be achieve by clicking on
Code -> Preferences -> Settings
Then you’ll view your settings file, it should look like the following:
The settings are in a JSON format so, in your right panel you can add the following line to enable automatic Format on Save:
And that’s it, now your HTM, JavaScript and every other language that you had a formatter for, will re-indent nicely on every save.
![Visual Studio Code - Settings Visual Studio Code - Settings](https://sebastianbecerra.cl/wp-content/uploads/2018/07/vs_code_settings.png)
![Visual Studio Code - User Settings Visual Studio Code - User Settings](https://sebastianbecerra.cl/wp-content/uploads/2018/07/vs_code_settings_capture.png)
"editor.formatOnSave": true
And your settings should look something like this
![Visual Studio Code - User Settings - Auto Format Visual Studio Code - User Settings - Auto Format](https://sebastianbecerra.cl/wp-content/uploads/2018/07/vs_code_settings_user.png)