How do I get Emacs to auto-indent Spacebars blocks when coding with Meteor? Right now, Emacs automatically does this:
{{#each player}}
{{name}}
{{/each}}
instead of this:
{{#each player}}
{{name}}
{{/each}}
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!
meteor-mode
and if all else fails, there's alwaysfundamental-mode
. But clearly usinghtml-mode
if you're not editing html won't lead to good results.