paredit-like sexp editing in catnip, please!
When using emacs for development, the lovely paredit allows brackets to be placed and moved efficiently, and prevents para-breaking edits from happening.
http://emacswiki.org/emacs/PareditCheatsheet
I would love to see this in catnip. Catnip already supports some bracket shortcuts:
(: "" -> () [: "" -> [] {: "" -> {}
But paredit can do more:
alt-( : a -> (a) ctrl-( : (a) b -> (a b) alt-s : (a b (c)) -> a b (c) alt-d : (a b) -> (b) ((a) b) -> (() b)
and so on.
This is the single most requested feature - from myself as well, so I guess this is coming in the near future. :)
+1
I've got a paredit-forward-slurp kinda working : (a) b -> (a b) - It uses a lot of fairly clunky cursor tricks to achieve it though, which I'm not entirely happy with. I'd prefer it working from some kind of AST instead, pulling in the next available form logically instead of by characters.. anyhow.
I'm pretty sure https://github.com/laurentpetit/paredit.clj can be gainfully employed to implement paredit style editing - it could even be ported to Clojurescript without much trouble, but even on the server side it'd be a lot better than reimplementing.
Good point - I'll look into implementing paredit.clj on the server side for now till the cljs branch is developed more :) The roundtrip shouldn't render it unusable