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

Auto deindentation if whole code block pasted are indented #771

Open
shelper opened this issue Apr 3, 2019 · 5 comments
Open

Auto deindentation if whole code block pasted are indented #771

shelper opened this issue Apr 3, 2019 · 5 comments
Assignees
Milestone

Comments

@shelper
Copy link

@shelper shelper commented Apr 3, 2019

i use bpython in vscode and if i send a block of lines that are indented to bpython, it will raise indentation error.

I wonder if it is possible to deindent the code if the whole block is indented. that makes sense if you want to test run lines within a loop , for instance.

@ikanobori
Copy link
Contributor

@ikanobori ikanobori commented Jan 5, 2020

It does make sense, is this like a copy/paste into the terminal or does "sending a block of lines" do something different?

@shelper
Copy link
Author

@shelper shelper commented Jan 5, 2020

sending a blocking of lines

@nraw
Copy link

@nraw nraw commented Feb 2, 2020

I think this is a critical deterrent for me.

When it comes to sending some lines from the code to bpython, for me they would rarely start without some indentation before it, so already something along the line of:

    a = 3

will break. This will also break in vanilla python, but wouldn't break in ipython for example.

@nraw
Copy link

@nraw nraw commented Feb 2, 2020

@supakeen supakeen added this to the release-0.20 milestone Apr 11, 2020
@supakeen supakeen self-assigned this Apr 11, 2020
@supakeen
Copy link
Member

@supakeen supakeen commented Apr 11, 2020

This will have to be gated between likely both paste detection and/or a feature flag that might default to on.

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

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.