Make PhpStorm indent proper amount of indent after bracket+comma

86 Views Asked by At

Currently, when I have the following (| is where the cursor is at):

  '/about': {
    component: {
        template: '#about-template'
    }
  },|

and I press enter, the cursor goes here

  '/about': {
    component: {
        template: '#about-template'
    }
  },
    |

but I want the cursor to go here:

  '/about': {
    component: {
        template: '#about-template'
    }
  },
  |

Here is an image for reference:

too much indent on PhpStorm enter new line

with the arrow pointing to where I want the new line's indent to start.

How do I achieve this?

1

There are 1 best solutions below

0
On

I made the indents for javascript to 2 spaces and it fixed the problem. It was my settings error. The indent was previously set to 4 spaces, which for me was causing the problem.