Search code examples
pythonformattingindentationvisual-studio-code

Visual Studio Code indentation for Python


How do I enable indentation in Visual Studio Code?

I'm trying to learn Python (new to programming) and need auto-indentation. It worked with the first version I tried, but it doesn't indent after a colon (:) any more. How can I configure it to automatically indent?


Solution

  • You can install the Visual Studio Code Python extension which will provide intellisense, auto-completion, code formatting, and debugging.

    Here is more information on the Python extension, here.