Many commands are bound to keys by default, and you can bind others or rebind any that are bound. With a couple of somewhat-exceptions (you usually should not mess with C-u, ESC, or C-g), you can easily create your own system of key bindings - you can pretty much replace any and all of the predefined key bindings.ĭoes this help understand Emacs keys? It should help understand Emacs more generally, because in Emacs, everything - every single user action, is a command. Predefined keys have no special significance. Oh, did I forget to say that because Emacs uses modifier and prefix keys to invoke specific commands, binding keys to commands is very important, and because it is important, users need to be able to do this themselves? This is behind the strong commitment that Emacs be a customizable editor. The rest is history: evolution, adaptation, suggestions and experiments by thousands of people. This is behind the system of using C-f, M-f, C-M-f, C-b, M-b, C-M-b, etc., with "f" signifying "forward" and "b" standing for "backward". At the time Emacs was created, this was a new idea, and it is still an idea that is stronger in Emacs than elsewhere.įor the same reason, some degree of organization of the many key sequences, providing some symmetry and other mnemonic aids, was called for. This is behind the strong commitment that Emacs be a self-documenting editor - just ask it about itself. For this, Emacs defined help keys, including C-h c and C-h k, which describe keys, and C-h w which tells you what key to use for a command name you type at the prompt. This means keys like f, e, g, v, b, j, i, o, m, n, SPC, DEL (Backspace), etc.īecause there are many commands, and thus many command-invoking key sequences, users need some help keeping track of them. Keys easy to reach by the stronger, longer fingers and the thumbs are generally easier to use often. Any command can be invoked using a simple-to-use key ( M-x) that prompts for you to enter its name. Seldom-used commands need have no key sequence. Commands used less often can have harder-to-use keys. Often-used commands, and often-used sequences of commands, should have relatively easy-to-use key sequences. Here are some of the basic ideas, which other posts here might go into, and which you can easily find more about elsewhere: This was carefully worked out, with experimentation - and it continues to be. So this combination worked pretty well.īeyond that is the question of which key sequences to use for what commands. Most key typing involves self-inserting keys. There is also an Alt key (aka Meta, typically), which in some cases allowed for a shortcut from using ESC-prefixed keys. There is also the Escape key ( ESC) key, and that too was put to use for invoking commands, as a prefix for key sequences. There is only one Ctrl key, so the commands you can invoke using it are (were, especially, at the time Emacs was created) limited in number. Using them you can mix self-inserting keys with command-invoking keys. (And this was also before there were things like a mouse, graphic-display, and window managers.) The ASCII control keys, using the Ctrl key, were the natural answer. So Emacs had to use other key combinations to invoke commands. And that means that they cannot simultaneously be used to invoke commands (other than the command to self-insert - in Emacs all user interactions invoke commands, in fact). This means that self-inserting keys such as letters self-insert (duh). Unlike vi, Emacs does not have two completely separated modes, one for issuing commands and one for inserting text. But that shouldn't be the starting point for a emacs-beginner. It just underline the "exoctic" status of that genius piece of software.ītw: I know the evil-mode and that emacs is able to modify nearly everything I want. I am looking forward to work with emacs the same way.Īnother side question would be why are CTRL and ALT are renamed in emacs? From the viewpoint of a beginner it doesn't help. But when I understood it everything went nice and easy. It would help me to get deeper into emacs if I would understand the concept behind that keys. In my opinion I have to move and combine my fingers in a unnatural way. They are hard to remember and hard to press. Why are the shortcuts this way? Even the basic ones. I did the emacs tutorial and couldn't get into it. You don't have to move your right hand/fingers away from the basic-position on the keyboard to navigate in your file. And I see a concept behind of the most shortcuts there. But this isn't the intention of that question! I come in peace! ) I know that emacs is often critzied because of its shortcuts.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |