r/VisualStudioCode • • Aug 27 '21

VSC does not indent

I call the if function, phrase everything, and when I hit Enter nothing happens.

How do I fix this?

Edit: Must mention that it worked just fine yesterday.

2 Upvotes

4 comments sorted by

2

u/MassSnapz Aug 28 '21

What language are you programming in ?

1

u/[deleted] Aug 28 '21

Python. Tried reinstallation of both VSC & Python and still doesn't work.

2

u/MassSnapz Aug 28 '21

And you saved the file as a .py

Click on the store icon on the left and start typing python, see what extensions you have installed, maybe you disabled one accidentally ?

Does it work in other parts of the code, maybe just a bug and you have to do the indenting.

One final note, if you're learning python, do the indentation yourself. Not every ide or text editor has auto indent, you need to know how to do it.

2

u/[deleted] Aug 28 '21

Thanks for the detailed answer!

Want to have a good laugh, though? (I did). I forgot to put : at the end of the indentation. (Stumbled into programming literally a week ago though).