MENU

Fun & Interesting

Emacs: define prefix/leader key (nested key maps)

Protesilaos Stavrou 4,521 1 year ago
Video Not Working? Fix It Now

In this ~24 minute video I show how to define a prefix key in Emacs using built-in functionality. The idea is to organise our keys in an efficient way. Using this method, we can have nested key maps as well, meaning that the prefix key can have access to the contents of another map which holds more key bindings. Put simply, we can have "C-z" as a prefix, "C-z b" as a nested key maps for buffer-related commands, and "C-z f" for file-related commands. This is a neat way to provide quick access to our most used commands. * * * Find all my publications on my website (Emacs, philsophy, Linux, etc.): https://protesilaos.com

Comment