Fuco1 / smartparens

Minor mode for Emacs that deals with parens pairs and tries to be smart about it.
GNU General Public License v3.0
1.83k stars 194 forks source link

Request: sp-barf-hybrid-sexp #570

Open Wasabichicken opened 8 years ago

Wasabichicken commented 8 years ago

For C/C++ modes, sp-slurp-hybrid-sexp is a godsend. It solves several issues I've got with the regular sp-forward-slurp-sexp, e.g. weird handling of the C++ arrow (->) operator and strange insertion of whitespace (see https://www.reddit.com/r/emacs/comments/451wn7/smartparens_for_clike_modes/)

However, there doesn't seem to be a sp-barf-hybrid-sexp available that undoes what sp-slurp-hybrid-sexp does. Since I suck at lisp and the SP source looks strange to me, consider this a humble feature request.

Wilfred commented 8 years ago

Agreed, there's no way of doing this currently and it would be nice.

Wilfred commented 8 years ago

FWIW, I explicitly fixed the whitespace issue, but only for Python, in #561. I don't think it's worth doing in general though -- for non-lisps the hybrid-sexp commands are better.

Fuco1 commented 8 years ago

and the SP source looks strange to me

don't worry, it's like that for everyone.