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:

  1. hit c-x ( start recording keyboard macro.
  2. do command supposed (i.e. execute commands, hit keys, ...)
  3. hit c-x ) stop recording keyboard macro.
  4. execute m-x name-last-kbd-macro name last-defined keyboard macro (i.e. 1 just defined).
  5. execute m-x insert-kbd-macro insert code of last defined macro @ point, copy init file.
  6. put (global-set-key (kbd "m-n") 'my-macro) init file (assuming named macro my-macro).
  7. profit!

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -