I am using Emacs with Prelude. When I hit C-c prefix in a clojure buffer, I would like to show a smartparens key bindings. Like in screenshot below I would like to to add entry for smartparens key bindings, just like C-c-, shows cider-test-command-map How can I do this ?

enter image description here

enter image description here

  • I may be wrong (new to emacs, coming from vim) a keymap is a set for key bindings, – Imaxd Aug 10 '19 at 22:14

Sounds like you want to define a new prefix key, say C-c z, for cider-mode, binding it to a smart-parens keymap.

Assuming that smart-parens-mode-map is that keymap, and assuming that cider-mode-map is the keymap that defines C-c as a prefix key, you can do this:

(define-key cider-mode-map (kbd "C-c z") smart-parens-mode-map)
|improve this answer|||||
  • Thank you. I will start from here. – Imaxd Aug 11 '19 at 11:57

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.