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?

2 Answers 2


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)

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.

  • Thanks for the pointers. Let me add more details and codes I got.
    – AhLeung
    Commented Nov 10, 2017 at 8:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.