0

First of all, my english is really bad, so please excuse me for my mistakes.

I am using Visual Studio Code for programming in python. But every time I create a new line, or try to put line to inner, I get this error:

IndentationError: unindent does not match any outer indentation level

I know what does It mean, but when I check the code in VIM, I see this: VSC vs VIM

And it happens every time. I installed python plugin, but it is still not working.

Danii-Sh
  • 447
  • 1
  • 4
  • 18
Crowor
  • 23
  • 5
  • Are you mixing tabs and spaces? See https://stackoverflow.com/questions/48735671/use-vim-retab-to-solve-taberror-inconsistent-use-of-tabs-and-spaces-in-indentat/48736702#48736702 – progmatico Apr 29 '18 at 15:52
  • @progmatico No, I only use tabs. – Crowor Apr 29 '18 at 15:53
  • The right column has obviously the wrong indentation in last line. Or in every line before, following the class if you prefer. – progmatico Apr 29 '18 at 15:55
  • @progmatico I know that, but if u see the pic, at the left side the VSC show me indentation correctly, but its not as you can see on the right side (VIM). – Crowor Apr 29 '18 at 15:56
  • I understand, suggest you really check again for tab and space mix. In vim you can follow the link explanation for the :retab command. Or delete and reinsert all that block tabs. – progmatico Apr 29 '18 at 16:01
  • Change your indentation level for tabs in VS Code to 8 instead of 4 and I bet you will see that you've mixed tabs and spaces accidentally. – Brett Cannon Apr 30 '18 at 19:46

0 Answers0