GNU bug report logs -
#56630
(yasnippet) how to disable TAB <tab> C-i?
Previous Next
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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 <at> 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!
This bug report was last modified 2 years and 282 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.