-
Notifications
You must be signed in to change notification settings - Fork 36.7k
Closed
Description
- VSCode Version: 1.5.2
- OS Version: Windows 8.1 and Ubuntu Linux 16.04
When writing certain Python code, auto-indent/de-indent fails to properly indent/de-indent lines as expected. For example, if I write:
if myVar == 1:
print("This is equal to 1")
else:
print ("This is not equal to 1")
The editor fails to automatically indent the "else" statement. it should be able to detect that I am entering an "else" statement and properly handle indentation and de-indentation. The same issue occurs on try/except blocks.
try:
subprocess.check_output("someprogram.exe")
except CalledProcessException:
print("The process failed.")
The editor should be able to detect when it sees the except block starter and properly de--indent the code as expected. As it stands, both the if/else and try/except blocks look like this when entered into the editor:
if myvar == 1:
print("This is equal to 1")
else:
print("This is not equal to 1")
Metadata
Metadata
Assignees
Labels
No labels