[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#56630: (yasnippet) how to disable TAB <tab> C-i?
From: |
edgar |
Subject: |
bug#56630: (yasnippet) how to disable TAB <tab> C-i? |
Date: |
Mon, 18 Jul 2022 15:29:37 +0000 |
User-agent: |
Roundcube Webmail/1.3.17 |
Hello,
as per: https://github.com/joaotavora/yasnippet, I am sending an e-mail
to you to ask for help.
I really like yasnippets, because it makes my workflow more productive,
but I have not been able to disable the autocompletion with the TAB key:
* What I have tried
(use-package yasnippet :defer t :commands (yas-minor-mode)
:bind
(:map
yas-minor-mode-map
("TAB" . nil)
("<tab>" . nil)
;; Expand with C-c m
;; (how?? yas--direct-{keymaps,org-mode})
("C-c m". yas-expand)
;; Change C-S-i to navigate back
("ESC TAB" . yas-prev-field)
:map
esc-map
;; Disable this to enable C-S-i to navigate back
;; (previously defined in bindings.el)
("\t" . nil)))
(with-eval-after-load 'yasnippet
(setq yas-snippet-dirs (list "~/snippets/"))
(yas--load-snippet-dirs)
;; allow to insert a snippet within a snippet
(setq yas-triggers-in-field t)
;; Testing (above)
;; ;; Change trigger key
;; (define-key yas-minor-mode-map (kbd "C-i") nil)
;; (define-key yas-minor-mode-map (kbd "C-c m") 'yas-expand)
;; (define-key yas-minor-mode-map [(tab)] nil)
;; (define-key yas-minor-mode-map (kbd "TAB") nil)
;; (define-key yas-minor-mode-map (kbd "<tab>") nil)
)
* Current behaviour
1. I launch a snippet with C-c m
2. Inside, I type the name of another snippet, for clarity, assume it is
tuk
3. I type [TAB], C-i
4. tuk gets expandedtuk
* Expected behaviour
1. I launch a snippet with C-c m
2. Inside, I type the name of another snippet, for clarity, assume it is
tuk
3. I type [TAB], C-i
4. I get out of ttukhe first snippet (tuk does not get expanded).
tuk is this:
# -*- mode: snippet -*-
# name: latex-inline
# key: tuk
# expand-env: ((yas-indent-line 'fixed))
# --
\\($1\\)$0
How do I configure yasnippet so that snippets get expended with C-c m
*only*? Thanks!
-------------------------------------------------
This free account was provided by VFEmail.net - report spam to abuse@vfemail.net
ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!
- bug#56630: (yasnippet) how to disable TAB <tab> C-i?,
edgar <=