0

What is the proper way to bind S-; to execute-extended-command?

I tried this (bind-key* "S-;" 'execute-extended-command) but doesn't work. bind-key is a function from use-package.

Update

I use evil mode.

  • Are you able to type Shift+:? Most keyboards require pressing shift just to enter a :. – npostavs May 5 '16 at 15:19
  • @npostavs thanx for pointing out. I have updated the question – user24665 May 5 '16 at 15:30
  • 4
    Ah, I don't think you can type S-; from Emacs' point of either, you probably just want to bind :. – npostavs May 5 '16 at 15:35
2

To figure out how to define a key binding that emacs can understand, simply do C-h c or C-h k following by pressing the keys you intend to bind.

In this case, doing C-h c followed by Shift+; gives :. So you need to bind the command to :.

So taking your example, it should be,

(bind-key* ":" #'execute-extended-command)
|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.