Skip to content

Conversation

@ShuguangSun
Copy link

@ShuguangSun ShuguangSun commented Sep 2, 2020

Add support for multiple key for one snippet. For example, the snippet below will be parsed as two snippets with two keys.

# name: choose
# key: choose
# key: choosevalue
# --
\\\"\${${1:1}:$$(yas-choose-value '("$0"))}\\\"

To avoid introducing bugs, I make a copy of some functions, for example, yas--parse-template to yas--parse-template-for-mulkey, and make changes to those functions.
M-x yas-compile-directory-for-mulkey for JIT.

As this patch intends to modifide the funtion yas--parse-template which is a quite core function, I'm not sure whether this patch can be accepted. If it is not acceptable now, I'd like to ask your kindness agreement for me to make a separate package, like the one in
yasnippet-multiple-key. It uses your code and the patch.

@ShuguangSun
Copy link
Author

Related with:
#375
#114
#342

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant