Auto-indent after braces while typing stoped working

I've been using Webstorm for years now, and this morning it's behaving differently.  I don't recall changing any settings last week (it's Monday).

I have my braces configured like so:

if (a < b) {
    foo();
}

When I type if (a < b) {,  Webstorm adds the closing brace, leaving my cursor between the two braces.  Normally, if I then press [Enter], Webstorm inserts a blank line between the braces and leaves my cursor at the correctly indented position, like this (pipe character represents my cursor):

if (a < b) {
    |
}

But today, no extra newline is added, and no indent is added, so I end up with this (again, pipe character is the cursor):

if (a < b) {
|}

I've reviewed all of the settings, and I don't really even see a setting for "auto indent newlines inside braces.  Also, I use a 3rd-party plugin (Illuminated Cloud 2) for Apex code (Salesforce programming language) and it's exhibiting the same behavior, which makes me think this is a Webstorm-wide editor setting, vs. a Javascript setting, but I can't find any settings that make a difference.  I have restarted Webstorm, and checked for updates (my Webstorm was already up-to-date).

 

0

It turns out that “Smart Indent” (Setup > Editor > Smart Keys > Enter > Smart Indent) was somehow unchecked.  I'm sure I didn't touch it, and I can find no key binding to change it, but once I found it and turned it on (huge thanks to Scott Wells of Rose Silver software, makers of Illuminated Cloud), all is fixed.

0

请先登录再写评论。