Skip to content

GuiltyDolphin/emaps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Emaps

Introduction

Emaps provides utilities for working with keymaps and keybindings in Emacs.

Features

Defining keys

Emacs has a built-in define-key function, but this can only handle one binding at a time, for example:

(define-key keymap "a" 'fun-a)
(define-key keymap "b" 'fun-b)
(define-key keymap "c" 'fun-c)
; etc.

Emaps provides the emaps-define-key function that provides the same functionality, but allows multiple keys to be defined at once, thus the above becomes:

(emaps-define-key keymap
  "a" 'fun-a
  "b" 'fun-b
  "c" 'fun-c) ; etc.

Viewing keymaps

Run M-x emaps-describe-keymap-bindings to display the bindings for a given keymap (see below), emaps-describe-keymap can be used to view keymaps as variables (but with characters displayed instead of integers, where possible). Executing these commands with a prefix argument allows you to choose from only active keymaps.

./images/emaps-describe-keymap-bindings.png

Recommended Bindings

I recommend the following bindings with Emaps (though I encourage you to experiment and find what works best for you):

KeyCommand
C-h Kemaps-describe-keymap-bindings

Which you can set with the following snippet:

(emaps-define-key global-map
  (kbd "C-h K") 'emaps-describe-keymap-bindings)

About

Utilities for working with keymaps in Emacs

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published