Skip to content
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

Shift+Tab unindent issue in Python #6615

Closed
oTree-org opened this issue Mar 5, 2021 · 2 comments
Closed

Shift+Tab unindent issue in Python #6615

oTree-org opened this issue Mar 5, 2021 · 2 comments

Comments

@oTree-org
Copy link

Using the official Python demo: https://codemirror.net/mode/python/

Paste in this code:

    if 1:
        p = 1
    if 2:
        p = 2

Select all text then try Shift+Tab to unindent it.

I expected this:

if 1:
    p = 1
if 2:
    p = 2

But got this:

if 1:
    p = 1
    if 2:
        p = 2

This issue is also described here: LightTable/Python#41

@marijnh
Copy link
Member

marijnh commented Mar 5, 2021

Shift-tab doesn't unindent by default (ctrl/cmd-[ does). Shift-tab auto-indents, and since python indentation isn't unambiguous from source, that may change the code.

@marijnh marijnh closed this as completed Mar 5, 2021
@oTree-org
Copy link
Author

OK I see, thank you for the explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants