Skip to content

Auto indent doesn't work with code blocks JavaScript #31027

Closed

Description

  • VSCode Version: Code 1.14.1 (2648980, 2017-07-13T19:18:47.188Z)
  • OS Version: Windows_NT ia32 10.0.15063
  • Extensions: none

Language: Javascript:

When creating first code block "{" and pressing enter the auto fill and indent doesn't quite work as it used to, it creates the closing block and creates new lines, but does not indent them back to where they should be

a for loop looks like:

for(var key in object)
    {

    }

instead of:

for(var key in object)
{

}

the other way of doing it works fine when it looks like:

for(var key in object){

}

The same happens with if statements too, but it doesn't happen with switch statements
Steps to Reproduce:

  1. create one side of code block "{"
  2. press enter to auto fill the rest

Activity

  1. changed the title [-]Auto indent doesn't work with code blocks[/-] [+]Auto indent doesn't work with code blocks JavaScript[/+] on Jul 19, 2017
  2. added
    editor-autoindent
    on Jul 19, 2017
  3. rebornix commented on Jul 19, 2017

    @rebornix
    Contributor

    Let's track it in #30933

  4. added
    *duplicate
    on Jul 19, 2017
  5. locked and limited conversation to collaborators on Nov 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

*duplicateeditor-autoindent

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions