Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I use yasnippet to insert some symbols (e.g., ✔), and I would like to do that in minibuffer too. When I press TAB in minibuffer, it said " is undefined". How to define it to use yasnippet? Is it safe to do that?
Bind TAB or whatever to whatever command you want (e.g. some yasnippet command) in the minibuffer keymaps.
See (elisp) Text from Minibuffer and Completion Commands for info about the minibuffer keymaps.
After adding the following 3 lines of code, I can use my snippets defined in org-mode, by pressing TAB inside minibuffer:
(add-hook 'minibuffer-setup-hook 'yas-minor-mode)
(yas--define-parents 'minibuffer-inactive-mode '(org-mode))
(define-key minibuffer-local-map [tab] 'yas-expand)
Required, but never shown