Auxiliary Joel
Auxiliary Joel

Reputation: 173

Visual Studio Code on Mac doesn't format correctly

I love a lot about Visual Studio Code. But on my Mac it does not format coding. The way it handles indenting is very frustrating. Some code text editors allow you to select all your code and 'tidy' or 'reformat' it to fix any bad indenting, but Visual Studio Code doesn't appear to have any options for this. Can anyone provide any tips or solutions?

Upvotes: 0

Views: 1902

Answers (1)

Matt
Matt

Reputation: 3760

Navigate the menu: Code > Preferences > Keyboard Shortcuts. Search for "format".

The default for editor.action.formatDocument is shift + option + F.

The default for editor.action.formatSelection is command + K + F.

Here's a similar question with answers.

Upvotes: 1

Related Questions