hvesalai / emacs-scala-mode

The definitive scala-mode for emacs
http://ensime.org
GNU General Public License v3.0
361 stars 68 forks source link

better way to wrap scala region with brackets #113

Closed fommil closed 7 years ago

fommil commented 8 years ago

This isn't necessarily a scala-mode idea, perhaps it belongs in our Hacks page.

I often find myself with some code like

val foo = bar.doTheThing(baz)

and I want to rewrite it as

val foo = magicalWowzers {
  bar.doTheThing(baz)
}

but doing so is really clunky. It would be great to have a key binding such that one only needs to move the point to the beginning of bar (i.e. to end of line, or select a region) and do this automatically.

fommil commented 7 years ago

Oh, I solved this already with smartparens.