Skip to content

MoveUp Line Auto-Indent #484

Closed
Closed

Description

@Astrantia

Environment data

VS Code version: 1.19.1
Python Extension version: 0.9.1
Python Version: 3.6
OS and version: Windows 10

Actual behavior

When moving up lines with key shortcut Alt+UpArrow or moving down with Alt+DownArrow, extension doesn't auto-indent blocks of code.
gif <--- Illustrates the issue.

Expected behavior

Auto-indentation should be added when moving up lines of code. I understand that some people would rather not have this feature added, but I think there should at least be a config option to enable/disable auto-indenting.

Steps to reproduce:

https://i.imgur.com/ZahMTvY.gifv

Activity

  1. Astrantia commented on Mar 17, 2018

    @Astrantia
    Author
  2. DonJayamanne commented on Mar 17, 2018

    @DonJayamanne

    Unfortunately there doesn't seem to be any interest in this feature from other users. we won't be looking into this at this stage, as there are other bugs and features that are more popular and higher priority (with more users interested in them).

  3. brettcannon commented on Apr 10, 2018

    @brettcannon
    Member

    Don Jayamanne (@DonJayamanne) is this feasible? In which case we can make this a "Help Wanted" feature.

  4. DonJayamanne commented on Apr 10, 2018

    @DonJayamanne

    Brett Cannon (@brettcannon)

    1. This would have to be done as part of the analysis engine, however.
    2. Moving lines up/down is done by VSC, and we do not have any hooks on formatting the code as they move around. Hence we'll need to create our own commands to move lines up/down (creating our own edits..). This would lead to us duplicating what VSC does today with minor changes.

    I'd kind of like format on paste, here we need format on line edit.
    I.e. we need some VSC hooks to get this done correctly.

  5. brettcannon commented on Apr 11, 2018

    @brettcannon
    Member

    OK, based on the fact that we need VS Code hooks to implement this I'm going to close it. @sulkhanp if you are up for opening an issue at Microsoft/vscode for the appropriate APIs then we can re-open this once those APIs exist.

  6. locked as resolved and limited conversation to collaborators on Jul 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions