I'm just starting to learn emacs (woohoo!) and I've been mucking around in my .emacs
quite happily. Unfortunately, I don't know Lisp yet, so I'm having issues with the basics.
I've already remapped a few keys until I fix my muscle memory:
(global-set-key (kbd "<f9>") 'recompile)
That's fine. But how can I tell a key to 'simulate pressing several keys'? For instance, I don't know, make <f1>
do the same as C-u 2 C-x }
(widen buffer by two chars).
One way is to look up that C-x }
calls shrink-window-horizontally
, and do some sort of lambda thing. This is of course the neat and elegant way (how do you do this?). But surely there's a way to define <f1>
to send the keystrokes C-u 2 C-x }
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…