I was quite angry at YASnippet‘s default yas-x-prompt
method (prompt method is the way of choosing from a few options when expanding snippets). Finally, I got to change it. It is trivial to do it using customize
, but I hate when someone meddles with my init.el
. You know, init.el
is such an intimate thing that neiter my wife, nor even Emacs itself are not allowed to modify it. Therefore, I dived into YASnippet’s source to see how it is done. After a minute, I added this smart piece of code to my init.el
:
(setq yas-prompt-functions (cons 'yas-ido-prompt (remove 'yas-ido-prompt yas-prompt-functions)))
Notice how clever (in the good sense of the word) it is: it essentially moves yas-ido-prompt
to the front of the yas-prompt-functions
list (yes, I do use Ido, and I quite like it!). Of course, you may choose another function for your default, C-h v
‘ing yas-prompt-functions
will reveal a few possible choices.
And finally, I disposed of this ugly, non-Emacsy, X-like menu. Long live the minibuffer!