1

I would like to extend the lisp editing shortcuts so SPC k [ and SPC k { would wrap the current form in [] and {} respectively.

I don't know what I need to write in my spacemacs config to enable this only for the lisp editing buffers.

What I did so far:

(spacemacs/set-leader-keys-for-major-mode 'clojure-mode "k [" 'sp-wrap-square)
(spacemacs/set-leader-keys-for-major-mode 'clojure-mode "k {" 'sp-wrap-curly)

But these add only in clojure mode and the shortcuts will be , k [ and , k { instead of the desired SPC k [ and SPC k {

0

I ended up with this:

(spacemacs/set-leader-keys (kbd "k [") 'sp-wrap-square)
(spacemacs/set-leader-keys (kbd "k {") 'sp-wrap-curly)
| improve this answer | |

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.