Replace Non-Standard Smart Editor Behavior With Smart Enter Handlers
There are 2 cases where we add 'smart' editing.
Pressing enter inside a function block - places caret in correct position for editing Typing '(' after the keyword 'function' creates a fully formed function expression
Both these uses should be replaced by usage of the standard editor CTRL-SHIFT-ENTER Smart Enter which is the standard way to supply such behavior.
This makes it optional. You can bind the ENTER key to the :"Complete Current Statement" action if you want this behavior all the time.