automatically correct indentation in visual studio code example
Example 1: visual studio code auto indent
On Windows Shift + Alt + F
On Mac Shift + Option + F
On Ubuntu Ctrl + Shift + I
Example 2: fix indentation visual studio
Select the text you want to automatically indent.
Click Format Selection in Edit, Advanced, or press CTRL+K, CTRL+F.
Format Selection applies the smart indenting rules for the language
in which you are programming to the selected text.