expez / evil-smartparens

Evil integration for Smartparens
GNU General Public License v3.0
134 stars 17 forks source link

evil-sp-delete-char should sexp forms if deleting a paren #47

Closed jgkamat closed 6 years ago

jgkamat commented 6 years ago

In the following cases

(print '|(one two three)) (print '(one two three|))

evil-sp-delete-char should delete the other delimiter (splice the form), to keep parens balanced. Unfortunately, sp-splice-sexp dosen't do exactly what we need, since one of these situations is outside the form.

this is the implementation cleverparens uses, maybe it can be adapted for smartparens too

expez commented 6 years ago

Sorry, but that is way too clever and it's not obvious to me that everyone would agree that a splice is better here. I personally don't like commands that do a bunch of different things depending on the context.

You should just copy the version in cleverparens if it does exactly what you want :) That's the most liberating part about emacs: you can mix and match and get the best of everything, just the way you like it.