projectional-haskell / structured-haskell-mode

Structured editing minor mode for Haskell in Emacs
BSD 3-Clause "New" or "Revised" License
542 stars 38 forks source link

support slurp and barf from paredit #115

Open lukehoersten opened 8 years ago

lukehoersten commented 8 years ago

Support slurp and barf to bring the next nodes in and out of the current node scope. This would work for things like () and [] as well as do notation scope changes.

jaen commented 8 years ago

I know +1s don't offer all that much value, but this seems like an essential feature. Point in case follows:

I decided to finally start learning Haskell for real and - having been doing Clojure recently - I thought this kind of editing could be nice in Haskell as well.
Was writing a naive quicksort to get to grips with spacemacs' Haskell layer (didn't use emacs before) and forgot to put pivot in a list, so I wanted to do [|] pivot (| being the cursor) and slurp from there, like in Clojure, but it seems there's no command for that.

So, +1 on that, since it feels like something natural to structural editing that's missing. Though it's probably harder to implement in a more syntaxed language like Haskell.

emmanueldenloye commented 7 years ago

You could use smartparens-mode (the non-strict version) to get the desired behaviour.