practicalli / spacemacs

Content for the book - Clojure Development with Spacemacs
https://practical.li/spacemacs
Creative Commons Attribution Share Alike 4.0 International
109 stars 33 forks source link

Keyboard macros in Evil #240

Open practicalli-johnny opened 4 years ago

practicalli-johnny commented 4 years ago

q followed by a character (other than ESC q) to start recording a keyboard macro. Enter command keys. ESC q to stop recording. Macro now available via the @ and character used

Example

q c will start recording and assign the macro to c

Type in the evil keys that represent the commands you want to include in the keyboard macro.

ESC qto save the macro as c

@c to run the macro

24@c to run the macro 24 times

Reference https://stackoverflow.com/a/22820324/1762872