GNU-devel ELPA - bind-key

bind-key

Description
A simple way to manage personal keybindings
Latest
bind-key-2.4.1.0.20240321.194020.tar (.sig), 2024-Mar-31, 30.0 KiB
Maintainer
John Wiegley <johnw@newartisans.com>
Atom feed
bind-key.xml
Website
https://github.com/jwiegley/use-package
Browse ELPA's repository
CGit or Gitweb
Badge

To install this package from Emacs, use list-packages.

Full description

If you have lots of keybindings set in your init file, it can be
hard to know which ones you haven't set yet, and which may now be
overriding some new default in a new Emacs version.  This module
aims to solve that problem.

Bind keys as follows in your init file:

  (bind-key "C-c x" 'my-ctrl-c-x-command)

If the keybinding argument is a vector, it is passed straight to
`define-key', so remapping a key with `[remap COMMAND]' works as
expected:

  (bind-key [remap original-ctrl-c-x-command] 'my-ctrl-c-x-command)

If you want the keybinding to override all minor modes that may also bind
the same key, use the `bind-key*' form:

  (bind-key* "<C-return>" 'other-window)

If you want to rebind a key only in a particular keymap, use:

  (bind-key "C-c x" 'my-ctrl-c-x-command some-other-mode-map)

To unbind a key within a keymap (for example, to stop your favorite major
mode from changing a binding that you don't want to override everywhere),
use `unbind-key':

  (unbind-key "C-c x" some-other-mode-map)

To bind multiple keys at once, or set up a prefix map, a `bind-keys' macro
is provided.  It accepts keyword arguments, please see its documentation
for a detailed description.

To add keys into a specific map, use :map argument

   (bind-keys :map dired-mode-map
              ("o" . dired-omit-mode)
              ("a" . some-custom-dired-function))

To set up a prefix map, use `:prefix-map' and `:prefix' arguments (both are
required)

   (bind-keys :prefix-map my-customize-prefix-map
              :prefix "C-c c"
              ("f" . customize-face)
              ("v" . customize-variable))

You can combine all the keywords together.  Additionally,
`:prefix-docstring' can be specified to set documentation of created
`:prefix-map' variable.

To bind multiple keys in a `bind-key*' way (to be sure that your bindings
will not be overridden by other modes), you may use `bind-keys*' macro:

   (bind-keys*
    ("C-o" . other-window)
    ("C-M-n" . forward-page)
    ("C-M-p" . backward-page))

After Emacs loads, you can see a summary of all your personal keybindings
currently in effect with this command:

  M-x describe-personal-keybindings

This display will tell you if you've overridden a default keybinding, and
what the default was.  Also, it will tell you if the key was rebound after
your binding it with `bind-key', and what it was rebound it to.

See the `use-package' info manual for more information.

Old versions

bind-key-2.4.1.0.20240312.160923.tar.lz2024-Mar-126.18 KiB
bind-key-2.4.1.0.20240210.91008.tar.lz2024-Feb-106.14 KiB
bind-key-2.4.1.0.20240102.22814.tar.lz2024-Jan-026.14 KiB
bind-key-2.4.1.0.20230930.220905.tar.lz2023-Oct-016.14 KiB
bind-key-2.4.1.0.20230101.54747.tar.lz2023-Jan-306.07 KiB
bind-key-2.4.1.0.20221212.80553.tar.lz2022-Dec-136.07 KiB
bind-key-2.4.1.0.20221029.145719.tar.lz2022-Oct-297.48 KiB
bind-key-2.4.0.20221027.132113.tar.lz2022-Oct-277.46 KiB
bind-key-2.4.0.20221027.2234.tar.lz2022-Oct-2723.0 KiB
bind-key-2.4.0.20221026.143452.tar.lz2022-Oct-2623.0 KiB