all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: edgar@openmail.cc
To: 56630@debbugs.gnu.org
Subject: bug#56630: Fwd: Re: (yasnippet) how to disable TAB <tab> C-i?
Date: Mon, 18 Jul 2022 15:34:00 +0000	[thread overview]
Message-ID: <f17c375dac491d41a23afe4b31e0238f@openmail.cc> (raw)
In-Reply-To: <e38d321efd83105f4dcbf9aa2097da84@openmail.cc>



-------- Original Message --------
Subject: Re: (yasnippet) how to disable TAB <tab> C-i?
Date: 2022-07-18 15:32
 From: edgar@openmail.cc
To: bug-gnu-emacs@gnu.org

Of course:
- yasnippet-snippets             20220401.1534   
c5bf4c4085aa61b9c07563de89f7aacc2a357db5
- GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, 
cairo version 1.17.6) of 2022-04-28

On 2022-07-18 15:29, edgar@openmail.cc wrote:
> 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!  





  reply	other threads:[~2022-07-18 15:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-18 15:29 bug#56630: (yasnippet) how to disable TAB <tab> C-i? edgar
2022-07-18 15:32 ` edgar
2022-07-18 15:34   ` edgar [this message]
2022-07-23  8:05 ` Lars Ingebrigtsen
2022-07-24 17:07   ` edgar
2022-07-26 12:07     ` Lars Ingebrigtsen
2022-07-31 22:32       ` Noam Postavsky
2022-08-01 20:00         ` edgar
2022-11-08 14:09 ` edgar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-08 14:10   ` edgar via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f17c375dac491d41a23afe4b31e0238f@openmail.cc \
    --to=edgar@openmail.cc \
    --cc=56630@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.