emacs24 - How to set a single key binding for a sequence of commands in Emacs -
the emacs manual has example set binding single command. how sequence of commands. following.
- [m-down] [c-u 1 c-v]
- [m-up] [c-u 1 m-v]
which practically single line scrolling.
you can use keyboard macros task. link pretty explains how it, completeness here's do:
- hit
c-x (
start recording keyboard macro. - do command supposed (i.e. execute commands, hit keys, ...)
- hit
c-x )
stop recording keyboard macro. - execute
m-x name-last-kbd-macro
name last-defined keyboard macro (i.e. 1 just defined). - execute
m-x insert-kbd-macro
insert code of last defined macro @ point, copy init file. - put
(global-set-key (kbd "m-n") 'my-macro)
init file (assuming named macromy-macro
). - profit!
Comments
Post a Comment