[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/tempel 6c288c32a2 80/82: README: Document Capf setup (F
From: |
ELPA Syncer |
Subject: |
[elpa] externals/tempel 6c288c32a2 80/82: README: Document Capf setup (Fix #14) |
Date: |
Sun, 9 Jan 2022 20:58:47 -0500 (EST) |
branch: externals/tempel
commit 6c288c32a2cbbc8233fe86a6fde3a12a827df815
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
README: Document Capf setup (Fix #14)
---
README.org | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/README.org b/README.org
index 16429e2599..7ac6f76f58 100644
--- a/README.org
+++ b/README.org
@@ -56,6 +56,20 @@ and has to be installed manually with ~package-install-file~.
:bind (("M-+" . tempel-complete) ;; Alternative tempel-expand
("M-*" . tempel-insert))
:init
+
+ ;; Setup completion at point
+ (defun tempel-setup-capf ()
+ ;; Add the Tempel Capf to `completion-at-point-functions'.
+ ;; The depth is set to -1, such that `tempel-expand' is tried *before*
the
+ ;; programming mode Capf. If a template name can be completed it takes
+ ;; precedence over the programming mode completion. `tempel-expand' only
+ ;; triggers on exact matches. Alternatively use `tempel-complete' if you
+ ;; want to see all matches, but then Tempel will probably trigger too
+ ;; often when you don't expect it.
+ (add-hook 'completion-at-point-functions #'tempel-expand -1 'local))
+ (add-hook 'prog-mode-hook 'tempel-setup-capf)
+ (add-hook 'text-mode-hook 'tempel-setup-capf)
+
;; Optionally make the Tempel templates available to Abbrev,
;; either locally or globally. `expand-abbrev' is bound to C-x '.
;; (add-hook 'prog-mode-hook #'tempel-abbrev-mode)
- [elpa] externals/tempel 5521546f48 10/82: README: Add header, (continued)
- [elpa] externals/tempel 5521546f48 10/82: README: Add header, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel d2d5566282 65/82: Improve description of PROMPT/DEFAULT value, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel e529887d5d 70/82: tempel-expand: Fix exit function, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 349e9735ac 08/82: Remove global temple-region variable, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel bdf04d8c48 05/82: Improved field movement, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 76a5ab120b 15/82: Add customization variables, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel f7990f528b 11/82: README update, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 5807ca4d28 33/82: Use remappings, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 9291904a84 24/82: Simplify overlay updates, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 5e1a864123 68/82: Add tempel-abbrev to define an abbrev, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 6c288c32a2 80/82: README: Document Capf setup (Fix #14),
ELPA Syncer <=
- [elpa] externals/tempel b5cea7ac67 03/82: Add template markers, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 545b929a28 45/82: README: Fix formatting, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 1ef2d76dd1 35/82: Add screenshots, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel fcfb19e134 47/82: Improve undo, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 36a7977702 62/82: Use cyan color for default values, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel bcf135f993 66/82: Bind lexical environment for prompt eval, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 7a7813e531 26/82: Maintain list of active templates, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 934bf35f4b 37/82: Set deleted overlays to nil, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel a5dde06576 75/82: Add tempel-abbrev-mode and tempel-global-abbrev-mode, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 49ba6e795e 79/82: README update, ELPA Syncer, 2022/01/09