I found a way to switch between the frames with the same command as I have configured OSX to use (CMD-§).
I just added this to init.el:
(global-set-key (kbd "M-§") 'other-frame)
So I don't need to "pass this" to OS, because this will have the exact same effect.
Try taking a look at this question on SO: Are there any emacs key combinations reserved for custom commands?
Regarding seeing what is available, there's the unbound
library (see the first answer to the above question).
One convention (grabbed from my answer to that question) is:
You can redefine anything, but the convention is to use C-c l (where l is any letter).
As a user, you can redefine any key;
but it is usually best to stick to key
sequences that consist of C-c
followed by a letter (upper or lower
case). These keys are "reserved for
users," so they won't conflict with
any properly designed Emacs extension.
The function keys F5 through F9 are also
reserved for users. If you redefine
some other key, your definition may be
overridden by certain extensions or
major modes which redefine the same
key.
Just remember that key bindings are different in each of the various (major and minor) modes, so what is available in one buffer isn't necessarily available in another. And make your key bindings at the most localized level possible. For example, if the functionality does something to a line of code, don't make a global key binding for it, define it in the appropriate keymaps (c++-mode-map
, ruby-mode-map
, etc.).
As far as your specific tasks, have you noticed:
- M-% aka
query-replace
- C-M-% aka
query-replace-regexp
Also, when you're searching (C-s or C-M-s (and the reverse variants)), you can type M-% (or C-M-%) to directly enter query-replace
(query-replace-regexp
) with the search string as the thing to substitute... Pretty handy.
Best Answer
M-
ismeta
, which is an old X11 extended shift key designation. In modern systems it's usually theAlt
key. You can also pressEsc
followed by the other keys in the sequence (here,Esc f
).You mostly won't see them on modern machines, but there are other extended shifts such as
S-
(super
; you may see this if you press theWindows
key) andH-
(hyper).