Emacs - How can I find the name of a command (to invoke Mx <command>) for key binding?
In Emacs, the command names are as follows:
indent everything inside the buffer (depending on which language you use) (equivalent to selecting the entire buffer and click on the tab)
move through the paragraph (equivalent to ctrl-up and ctrl-down)
- move by word (equivalent to ctrl-right and ctrl-left)
The truth is that I switched to a macbook for a professional level, and these functions are not possible due to binding OS shortcuts to ctrl + ...
I already tried to find this on google, but no results. I will assign new bindings to these functions in .emacs.
To help you help: Ch k describes the key. Just hit it and then a key combination and then it will give you a name and a document for the related elisp function.
For you this:
indent-region (usually it depends on the mode)
forward paragraph and inverse paragraph
reverse word and forward word
Mx indent-regionMx backward-paragraphandMx forward-paragraphMx backward-wordandMx forward-word
As already mentioned, you can use Ch k to display the documentation for this binding. Another useful command is apropos-command tied to Ch a to find if you know part of its name.
But another really cool feature for text alignment is align-regexp associated with Cx \ .
eg.
a = 12; baz_to_bar = 3.14; foo = 42; Select a region and then use Cx \ = RET
a = 12; baz_to_bar = 3.14; foo = 42; And as its name suggests, you can use a regular expression to determine how emacs align your text. Enjoy it!