0

Using web-mode and evil I get a really strange behaviour when pressing return after curly braces:

let StubMapsService = Ember.Service.extend({
    getMapElement(location) { (RET)
        }
});

let f = function(assert) { (RET)
    }

RET is set to "evil-ret".

When writing java-files the Indentation is correct after inserting }.

Also when I press C-c TAB in web-mode, so web-mode auto-indents the buffer, then everything looks correct:

let StubMapsService = Ember.Service.extend({
    getMapElement(location) {
    }
});

let f = function(assert) {
}

I searched for an hour for a solution. I tried changing c-indent-offset, setting web-mode-code-indent-offset, but nothing helped. Turning off electric-indent-mode I get no indentation after pressing RET. Any Idea what is going wrong?

  • web-mode is probably assuming that you want to write something on that line. Does typing TAB on that line solve the problem? – DoMiNeLa10 Jan 11 '17 at 17:40
  • Yes: I need to get out of insert-mode, jump in front of the closing bracket and then go back in insert-mode and press tab. Obviously this is not what I want. Like in java-files I want the right Indentation as soon as I type the closing bracket. – itmuckel Jan 12 '17 at 7:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.