2

I’m new to visual studio code, just switched from sublime text 3. I was writing a simple if statement and when I write else: like that, on ST3 it would move the else to under if but this doesn’t happen with vscode. I’ve tried everything and looked everywhere but doesn’t seem to work. Any ideas of why? Or does vscode really lack this basic fundamental feature?

hiha2828
  • 153
  • 4
  • 9
  • 1
    search for 'vscode formatting python' https://donjayamanne.github.io/pythonVSCodeDocs/docs/formatting/ – fuzzybear Jul 08 '18 at 15:28
  • Is it possible to get the else: statement to go under if after hitting enter in vscode? I would prefer that over having to save it each time for this to happen – hiha2828 Jul 08 '18 at 15:34
  • best to try the full blown Add-on https://marketplace.visualstudio.com/items?itemName=ms-python.python – fuzzybear Jul 08 '18 at 16:14
  • I have used this but it still doesn’t work sorry. – hiha2828 Jul 08 '18 at 22:14
  • Possible duplicate of [How to enable auto-indentation of Python function arguments in VS Code](https://stackoverflow.com/questions/52353160/how-to-enable-auto-indentation-of-python-function-arguments-in-vs-code) – Konrad Sep 28 '18 at 13:31

1 Answers1

3

This is a known issue that requires a non-trivial implementation of a custom indentation provider.

Brett Cannon
  • 14,438
  • 3
  • 45
  • 40