Auto indent in JS after creating array/object literal.


I use (latest) version of PHPStorm at home (Win7) at work (OSX) but since the platform doesn't yet support the ability to store all necessary settings in 1 repo and then share those configurations across different platforms, I've wracked my brain up and down trying to find this SIMPLE option using every possible combination of keywords that could be related. Currently, my OSX does what I want, but Win7 does not. 

What I want? When creating a JS Object/Array literal, and inside the braces, when pressing ENTER, to go from it looking like:


(cursor here)}

To looking like:


(indent)(cursor here)


PHPStorm is a great editor. I just renewed for my second year. I hope eventually a shared repo of configurations, installed plugins, keyboard shortcuts, etc. can be supported.

1 comment

A co-worker just pointed it out to me: SETTINGS > EDITOR > GENERAL > SMART KEYS > ENTER > SMART INDENT.

This nightmare is over. lol. 


Please sign in to leave a comment.