Skip to content

Auto indent else inside if block #2147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fireattack opened this issue Jul 12, 2018 · 1 comment
Closed

Auto indent else inside if block #2147

fireattack opened this issue Jul 12, 2018 · 1 comment

Comments

@fireattack
Copy link

fireattack commented Jul 12, 2018

Environment data

  • VS Code version: 1.25.1
  • Extension version: 2018.6.0
  • OS and version: Win 7 64-bit
  • Python version: 3.6 64-bit

Actual behavior

It doesn't unindent else::

if 2 > 1:
    print(1)
    else:

Expected behavior

It should unindent else:

if 2 > 1:
    print(1)
else:

STR

  1. Type in the above code in a .py file.

Comments

it has been reported before (https://github.com/DonJayamanne/pythonVSCode/issues/432 and https://github.com/DonJayamanne/pythonVSCode/issues/789), but should be fixed. I've set editor.formatOnType to true.

@brettcannon
Copy link
Member

Duplicate of #771

@brettcannon brettcannon marked this as a duplicate of #771 Jul 13, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Aug 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants