[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/devil 21eeb196f7 10/49: Explain how to configure multiple
|
From: |
ELPA Syncer |
|
Subject: |
[nongnu] elpa/devil 21eeb196f7 10/49: Explain how to configure multiple Devil keys |
|
Date: |
Mon, 15 May 2023 12:59:31 -0400 (EDT) |
branch: elpa/devil
commit 21eeb196f74a18509be48509af3822c49406cbe2
Author: Susam Pal <susam@susam.net>
Commit: Susam Pal <susam@susam.net>
Explain how to configure multiple Devil keys
---
README.md | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/README.md b/README.md
index d1840bc17d..edc7cfccec 100644
--- a/README.md
+++ b/README.md
@@ -29,6 +29,7 @@ Contents
* [Local Mode](#local-mode)
* [Custom Appearance](#custom-appearance)
* [Custom Devil Key](#custom-devil-key)
+* [Multiple Devil Keys](#multiple-devil-keys)
* [Why?](#why)
* [Support](#support)
* [Channels](#channels)
@@ -385,6 +386,38 @@ see the variables `devil-special-keys`,
`devil-translations`, and
`devil-repeatable-keys`, respectively.
+Multiple Devil Keys
+-------------------
+
+While this package provides the comma as the default and the only
+Devil key, nothing stops you from extending the mode map to support
+multiple Devil keys. Say, you decide that in addition to activating
+Devil with `,` which also plays the role of `C-`, you also want to
+activate Devil with `.` which must now play the role of `M-`. To
+achieve such a result, you could tuse this initialization code as a
+starting point and then customise it further based on your
+requirements:
+
+```elisp
+(defvar devil-mode-map
+ (let ((map (make-sparse-keymap)))
+ (define-key map (kbd ",") #'devil)
+ (define-key map (kbd ".") #'devil)
+ map))
+(require 'devil)
+(global-devil-mode)
+(setq devil-special-keys '((", ," . (lambda () (insert ",")))
+ (". ." . (lambda () (insert ".")))))
+(setq devil-translations '(("," . "C-")
+ ("." . "M-")))
+```
+
+With this configuration, we can type `, x , f` for `C-x C-f` like
+before. But now we can also type `. x` for `M-x`. Similarly, we can
+type `, . s` for `C-M-s` and so on. Further, `, ,` inserts a literal
+comma and `. .` inserts a literal dot.
+
+
Why?
----
- [nongnu] elpa/devil 2cc21ac252 26/49: Set version to 0.2.0, (continued)
- [nongnu] elpa/devil 2cc21ac252 26/49: Set version to 0.2.0, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil 83e96bcfce 15/49: Fix typo in function name: s/repetable/repeatable/, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil 2ccbcb04f4 27/49: * devil.el: Update header with more information, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil 483ce72f48 35/49: Convert .md files to .org files, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil 5ae5957fc5 37/49: Improve package description, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil 98064ffed4 49/49: Remove superfluous exclamation mark, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil 1cee55eaa3 41/49: Use sharp-quotes consistently for function names, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil c6db405df4 14/49: Address code review comments offered on MELPA, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil f57adb4860 03/49: Set version to 0.1.0, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil a98cb1a7bd 09/49: Automatically detect the activation key, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil 21eeb196f7 10/49: Explain how to configure multiple Devil keys,
ELPA Syncer <=
- [nongnu] elpa/devil 1cf89ce338 11/49: Add yank-pop as a repeatable command, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil 402dcfd7fb 13/49: Fix repeatable key sequence for yank-pop, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil ef5449deda 16/49: Add kill-line and undo to repeatable keys, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil 02464b7516 18/49: Explain why a single activation key is the default, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil 4b1eba8a1c 24/49: Add stricter validation of translated key sequence, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil 6943ff3e82 28/49: Remove custom version command., ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil 459ce032e4 32/49: * devil.el (devil--log-command-loop-info): Use a single 'format', ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil fa6eb0a319 33/49: Move tests to separate file using ERT, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil 355bcc9c14 34/49: Extract most of the README into a separate manual, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil 79fd50fe22 36/49: Set version to 0.3.0, ELPA Syncer, 2023/05/15