Open lukehoersten opened 8 years ago
I know +1
s 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.
You could use smartparens-mode (the non-strict version) to get the desired behaviour.
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 asdo
notation scope changes.