I just installed the pt.el package and now I want to bind projectile-pt to the default projectile search prefix (which is C-c p s). The goal is to have it as C-c p s p to begin with but also to have this follow the projectile prefix if I later change that to C-p for example (it would then automatically become C-p s p).

Is this possible? Sorry for the perhaps badly phrased question, will reword it if needed later.


The bindings for projectile are stored in projectile-command-map, so we can use define-key to add more stuff: (define-key projectile-command-map (kbd "s p") #'projectile-pt). This adds s p to whatever projectile-keymap-prefix happens to be.

| improve this answer | |
  • Thanks! This made me understand how keymaps work a bit more! Merry Christmas! :) – Mattias Bengtsson Dec 25 '14 at 18:26

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.