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

Automatic indentation inside brackets #701

Closed
seekiu opened this issue Feb 3, 2018 · 7 comments
Closed

Automatic indentation inside brackets #701

seekiu opened this issue Feb 3, 2018 · 7 comments
Assignees
Labels
area-formatting feature-request Request for new features or functionality

Comments

@seekiu
Copy link

seekiu commented Feb 3, 2018

Environment data

VS Code version: 1.19.3
Python Extension version: 2018.1.0
Python Version: 3.6.3
OS and version: Windows 10 1709

Actual behavior

When adding new line within brackets, the indentation does not conform to PEP8 format. E.g.

some_list = [item1,<press enter here>
<cursor gets to here>

Expected behavior

some_list = [item1,<press enter here>
             <cursor expected to be here>

I'm not sure if this is a python extension related issue or maybe VS code issue. I'm also using Vim, which has an extension specifically for this: https://github.com/Vimjas/vim-python-pep8-indent. It would be nice if this feature can be added to the extension. Thanks.

@DonJayamanne
Copy link

DonJayamanne commented Feb 3, 2018

Similar to #481
Though that is specific to indenting of function arguments

@MikhailArkhipov cc

@DonJayamanne DonJayamanne added feature-request Request for new features or functionality area-formatting awaiting 1-decision labels Feb 3, 2018
@seekiu
Copy link
Author

seekiu commented Feb 5, 2018

This is indeed similar to #481. But there are also some python-specific conventions of indentation that are not usually found in other languages such as C/C++. So I think it is reasonable to consider incorporating this functionality into the python extension.

Ideally, the final result should be just like what https://github.com/Vimjas/vim-python-pep8-indent has done. And to be honest, this is one of the main reasons I sometimes still switch back to Vim, despite the great environment VS code and this extension has already provided.

@MikhailArkhipov MikhailArkhipov self-assigned this Feb 6, 2018
@brettcannon brettcannon added this to the May 2018 milestone Mar 28, 2018
@brettcannon brettcannon modified the milestones: May 2018, June 2018 May 7, 2018
@brettcannon brettcannon removed this from the June 2018 milestone Jun 4, 2018
@krisjobs
Copy link

krisjobs commented Jun 7, 2018

So, was this moved to the June18 milestone?

@brettcannon
Copy link
Member

@krisjobs no as the June milestone is specifically bug fixes only as we're trying to free up time for the experimental debugger. Once that's work is done we will come back to enhancements and working on automatic indentation, I suspect, will be high on our list.

@kbrose
Copy link

kbrose commented Jan 5, 2019

Hello, I'm wondering if it would be possible to get a status update on this issue? I see a little bit of action in the related #481.

@DonJayamanne
Copy link

Duplicate of #481

@DonJayamanne DonJayamanne marked this as a duplicate of #481 Jan 5, 2019
@ghost ghost removed the needs PR label Jan 5, 2019
@kbrose
Copy link

kbrose commented Jan 8, 2019

@DonJayamanne It is a duplicate as long as you pay attention to the note #481 (comment) that #481 should be more general than just function arguments, it applies to any sort of bracket pair. The issues as written in the OPs are not duplicates IMO.

@lock lock bot locked as resolved and limited conversation to collaborators Feb 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-formatting feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

7 participants