I know Visual Studio can auto format to make my methods and loops indented properly, but I cannot find the setting.
To format a selection: Ctrl+K, Ctrl+F
To format a document: Ctrl+K, Ctrl+D
See the pre-defined keyboard shortcuts. (These two are Edit.FormatSelection
and Edit.FormatDocument
.)
On macOS, use the CMD ⌘ key instead of Ctrl: