"Enter" doesn't work in VS Code for Python

Viewed 4140

I installed Anaconda. Somehow, afterwards, when I press Enter in Python files, it no longer works. This error shows up:

command 'pythonIndent.newlineAndIndent' not found

How do I solve this problem?

4 Answers

I had the same problem. I solved the problem by uninstalling an extension called "Python Indent"

Try checking your keybindings.json file, also disable all VS Code extensions and install them one by one. Maybe it's caused by some buggy extension.

Search Enter in Keyboard Shortcuts and see if your wanted one is list there:

enter image description here

If not, search with your wanted effect that enter brings and see if you changed the keybindings, which you can see your customization in keybindings.json.

Or disable the third-party extension but only keep Python.

If the above don't work, you may reset VS Code.

uninstall python indent from vs code then again download the same extension.Hopefully now it works properly.

Related