Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emacs - How can I find the name of a command (for calling M-x <command>) for a key binding?

In Emacs, what are the names of the commands to:

  • indent all inside the buffer (in function of which language you use) (equivalent of select all the buffer and press tab)

  • move by "paragraph" (equivalent to ctrl-up and ctrl-down)

  • move by word (equivalent to ctrl-right and ctrl-left)

The true is that I moved to a macbook for professional raison and these features are impossible because of the binding of OS shortcuts on ctrl+...

I already tried to find this on google but no results. I will assign new bindings to these functions in .emacs.

like image 570
Bebeoix Avatar asked Apr 28 '12 05:04

Bebeoix


People also ask

What is the MX command in Emacs?

For example, C-x means CONTROL-x , while M-x means META-x ; you have to press both keys (i.e., either CONTROL or META ) and x simultaneously. [To do this, keep the CONTROL or META key pressed - this has no effect, it is only "prefixing" the keyboard entry - and then press the x .]

How do you bind commands in Emacs?

Keys can be bound to commands either interactively or in your . emacs file. To interactively bind keys for all modes, type M-x global-set-key RET key cmd RET . To bind a key just in the current major mode, type M-x local-set-key RET key cmd RET .

What keys does Emacs use for special commands?

Although only the Control and Meta modifier keys are commonly used, Emacs supports three other modifier keys. These are called Super, Hyper, and Alt.

How do I set key binding?

To reassign a keySelect the Start button, and then select Microsoft Mouse and Keyboard Center. From the displayed list of key names, select the key that you want to reassign. In the command list of the key that you want to reassign, select a command.


1 Answers

To help you help yourself: C-h k is describe key. Just press it and then your key combination and then it gives you the name and the doc for the bound elisp function.

For you it is:

  • indent-region (this is usually depending on the mode)

  • forward-paragraph and backward-paragraph

  • backward-word and forward-word

like image 144
flolo Avatar answered Sep 21 '22 16:09

flolo