3

I find smartparens awkward. It's easier for me to type the matching paren/quote than to arrow over or C-f over. I want to turn off smartparens everywhere. I'm using prelude though and I can see that prelude turns on smartparens for a variety of the language specific packages that it uses.

Is there a way to globally turn off smartparens? I'm assuming that it goes somewhere in my personal/ directory in one of my custom init files.

  • Not an answer, but smart parens is supposed to be "smart", in particular, typing the matching closing paren should usually skip over it as if you had used C-f. – T. Verron Nov 21 '14 at 13:32
  • I don't use it, but I'm guessing from the smartparens installation page that you can put something like (smartparens-global-mode -1) in your init file (if -1 doesn't work, try 0 and nil). Also, it looks like you can turn it off on a buffer-by-buffer basis with (turn-off-smartparens-mode). – Dan Nov 21 '14 at 13:36
3

I don't see an option in prelude to disable smartparens globally -- looks like it is enabled in a prog-mode-hook and a few other places.

You could advise smartparens-mode (and perhaps smartparens-strict-modeas well) to prevent them from enabling the mode. Assuming you are on Emacs 24.4, try this:

(advice-add #'smartparens-mode :before-until (lambda (&rest args) t))

This effectively makes smartparens-mode return t and do nothing.

1

This worked for me:

M-x customize-group RET smartparens RET

Then use the Easy Customization interface to toggle Smartparens Global Mode to "off" (nil), then choose to apply and save your changes. (The setting started in the "off" state for me, but smartparens was active anyway. I had to toggle it "on" and back "off" to disable it successfully.)

EDIT: I take it back; it worked temporarily. Smartparens is activated again upon starting a new session. Maybe this is an issue with Prelude?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.