So I've switched to Emacs Prelude, and like it; it comes with 95% of the stuff I want baked-in, and that's lovely. Only one thing I want to change: mode-specific indent between parens, a la autopair.el
. For instance, if I'm writing Scala and type:
Object foo {
bar() {}
}
... and enter a newline between the curly braces of bar
, I should get:
Object foo {
bar() {
// And point should be here, a Scala-standard two-space indent in from bar.
}
}
But, if I were writing more or less the same thing in PHP, I should get a tab
character instead of a two-space tab.
So: is there a "right" way to tweak this through custom.el
? Prelude uses smartparens
instead of autopair.el
, configured in prelude-editor.el
-- but I'd rather get this configured without having to hack "core" Prelude so that I can merge in updates easily.
Thoughts? Anybody else figured out how to do this with smartparens
at all, or Prelude in particular?