Skip to content

Minor problems with formatting #46107

Closed
Closed
@ghost

Description

  • VSCode Version: 1.20.1
  • OS Version: Windows 10 version 1709

VS Code is my primary way of writing C++ programs apart from VS, but the text editing still needs a little improvement.

  1. The Alt + Up/Down feature.
    I seem to remember that the shortcut could automatically adjust the number of tabs before the lines of code selected to fit wherever they are placed in previous versions (before the icon is changed to blue). But now, the number of tabs will not adjust. Could you please fix that because I use the shortcut frequently and sometimes the problem annoys me.

  2. Automatic indentation incorrect with ':'
    In class definitions and switch statements, the colon is used. But the indentation is kinda not right. If a line of code ends with ':' (for instance, "private:" or "case xxx:"), the number of indentations of the line of code should be decreased by 1. Take an example:

// What it should look like:
switch (foo)
{
case 1:
    // do something
    break;
case 2:
    // ...
    break;
// ....
}

// What it's like in VS Code without manual formatting:
switch (foo)
{
    case 1:
    // do something
    break;
    case 2:
    // ...
    break;
// ....
}

That's all. I hope the problems can be solved in future updates. The problems are not huge bugs but solving them make coding all the more convenient. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    *caused-by-extensionIssue identified to be caused by an extensioneditor-autoindentEditor auto indentation issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions