Your web-browser is very outdated, and as such, this website may not display properly. Please consider upgrading to a modern, faster and more secure browser. Click here to do so.
Keyboard macros can be crazy helpful in emacs, and allow you to automate repetitive processes you come across when coding. if you have a sequence of keystrokes you use day-to-day, here is how to convert them to a function and bind it to a key:
C-x ( to start your macroC-x ) to end the macroC-x C-k n to call kmacro-name-last-macro and assign a name to your macroM-x insert-kbd-macro to output the lisp code of your new macro(global-set-key <key> '<macro_name>) to bind it to a key. C-x C-k 0-9/a-z are reserved for personal key bindings. you can also use the f1 - f12 keysand your done! now you have compressed several keystrokes into just one, and it’ll also be there when you need it.
5 notes