1

I am trying to find a way to have VSCode automatically indent items when I hit enter within the parenthesis to the start of the parenthesis like so below (similar to this post). This works well in Jupyter, but I can't find the same solution in VSCode and could not find a solution online. Does someone know how to achieve this may be through presets in VSCode? Thanks in advance.

Current:

dict = {
    "One": 1,
    "Two": 2,
    "Three": 3
}

Desired:

dict = {"One": 1,
        "Two": 2,
        "Three": 3}

EDIT @Shradha Although similar-sounding to what I'm looking for, your suggestion does not address the code in the manner I'm looking. Thank you.

Konrad Rudolph
  • 530,221
  • 131
  • 937
  • 1,214
Mauro
  • 307
  • 4
  • 8
  • Does this answer your question? [How to change indentation in Visual Studio Code?](https://stackoverflow.com/questions/34174207/how-to-change-indentation-in-visual-studio-code) – Shradha Oct 01 '20 at 20:06

1 Answers1

0

Don't know about presets but there is an extension that does just that: https://marketplace.visualstudio.com/items?itemName=LAK132.indent-to-bracket

Big Temp
  • 434
  • 4
  • 12