How do I get Emacs to auto-indent Spacebars blocks when coding with Meteor? Right now, Emacs automatically does this:

{{#each player}}

instead of this:

{{#each player}}

Failing that, can I stop Emacs from deleting my indentation when I hit return? If I manually add indentation so that the code looks like the second example above, then hit return after {{name}}, it deletes the indentation so it looks like the first example.

Right now I’m using Emacs 25.2.2. I just use the basic GNU Emacs that I installed in Ubuntu 18.04, so I guess Vanilla Emacs. The major mode when I open html files is HTML.

I got a suggestion here to use web-mode.el, but I couldn't figure out how to set it up for Meteor.

Thanks in advance for any help!

  • Find yourself a meteor-mode and if all else fails, there's always fundamental-mode. But clearly using html-mode if you're not editing html won't lead to good results.
    – Stefan
    Jun 20, 2020 at 2:12
  • @Stefan your comment seems to be assuming that I understood modes, even though that lack of understanding was a big part of the problem. It would have been more helpful to share something like the Emacs Manual page on major modes: gnu.org/software/emacs/manual/html_node/emacs/…
    – Frankie
    Jun 21, 2020 at 20:59

1 Answer 1


I figured out how to use web-mode to solve my problem. For anyone interested, I explained what I did here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.