3

Visual Studio Code Version: 1.32.3

I would like to change code indentation style on Visual Studio Code from this :

if (xRatio < yRatio)
{
  ...
}

to this :

if (xRatio < yRatio) {
  ...
}

Cannot find anything on Settings > Text Editor > Formatting ...

Any idea ? Should i use a plugin for this ?

Edit

It concerns all codes technos with brackets (C++, JS, Java, etc ...)

1
  • 2
    You haven't said what language (C, C++, C#, Javascript, etc)... but I'm not aware of any options in VS for this. I've never used it but I'm aware of Resharper which I think might do it Commented Mar 29, 2019 at 9:42

1 Answer 1

1

What you're talking about is not actually "indenting", but "beautifying".

For that there are specific plugins depending on the language that you want to beautify, and they have their own configuration.

For example, the beautify plugin for javascript that I use ( https://marketplace.visualstudio.com/items?itemName=HookyQR.beautify ) has that kind of formatting as the default.

I'd say that in most plugins that is actually the default, but I'm not 100% sure.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.