It is okay to format a few lines of code manually but imagine if we are writing 1000 lines of code and we are spending a lot of our time in formating them correctly. But many Visual Studio Code users don't know about the auto-formatting feature that is available in VS Code.
Today we are going to save a lot of your precious time by letting you know how you can enable this feature on VS Code.
Step 1: Open your Visual Studio Code and click on the Settings icon from the lower-left corner and then select Settings.
Step 2: Now, inside the User section, select Text Editors and expand this section. You can see a setting option name "Formatting" select that option.
Step 3: Inside Formatting, select the check box with the name "Format On Save" and that's it.
Now you will observe that whenever you write and piece of code and click on Save, your code will automatically get formatted. Now you just enjoy writing beautiful code without worrying about formatting them.
No comments:
Post a Comment