joaotavora / yasnippet

A template system for Emacs
http://joaotavora.github.io/yasnippet/
2.81k stars 311 forks source link

how to browse snippet keys + names #1131

Open mooseyboots opened 2 years ago

mooseyboots commented 2 years ago

is there a way to browse snippets as a list of names + their key?

i'm trying to learn the keys of some common snippets, and typing a likely candidate like def and hitting TAB isn't very efficient.

how to people normally learn them? surely not by looking up each snippet individually...

i also wondered if it wouldn't be possible to display the key alongside the snippet name in the completion offered by yas-insert-snippet, in a manner akin to how helm etc. displays a given keybinding next to a command, so if you fall back to using that to look one up you would learn its key for next time, and also see the keys of some other ones.

EDIT: i just found #813. is yas-describe-tables the only way to do this? it also seems pretty inefficient.

nfedyashev commented 2 years ago

helm-yas is pretty handy for this.

helm-yas

It also lets one trigger helm action on ctrl z : helm-ctrl-z-action

whatacold commented 2 years ago

Also you could give ivy-yasnippet a try

Eason0210 commented 1 year ago

consult-yasnippet is the best solution if you are using consult.