Change default 'save' behavior


#1

UPDATE: Turns out this was due to my own doing. I’m using the jsFormat package which has the “Format on save” setting enabled by default. Disabling that solved both these issues. Life is good again.


1) When I save a JS file, atom changes the formatting-style of my ‘if-else’ statements.

From this:

if (foo){
    // do something
}
else {
    // do something else
}

To this:

if (foo){
    // do something
} else {                                       // <-- This 'else' was on it's own line before saving
    // do something else
}

How can I change that ?

2) Also, when I save a file, atom unfolds any collapsed code-blocks.
From this:

function foo(){ ...

To this:

function foo(){
    // foo content here
}

I want to change \ disable this behavior as well.

These 2 issues are really annoying, as I need to un-fix my code after each save, due to atom attempts to fix my code for me (which might be a good idea on it’s own, given that I can have control over such settings etc…)

Any ideas anyone ?