How to hide/overriding other snippet with same name defined for parent mode?
260 views
Skip to first unread message
shjk
unread,
Jul 25, 2012, 10:26:48 AM7/25/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to smart-...@googlegroups.com
Hi,
I've got a hl snippet to produce a horizontal line up to the fill column which is defined for text-mode. For some modes that have text-mode as parent (via .yas-parent) I want to replace this with a different snippet. In 0.5.* this was possible by just adding a snippet with the same name in the more specific mode. In 0.7.0 I get asked which of the two snippets I want to expand (without making it possible to see which is which). Is it possible to tell yasnippet to always use the more specific one in 0.7.0/0.8.0? I can create a work-around by having a more complex snippet that expands to different things depending on the major-mode but this is a bit inconvenient and a hacky non-solution.
shjk
João Távora
unread,
Jul 25, 2012, 12:45:02 PM7/25/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to smart-...@googlegroups.com
I see, I was never aware of this "feature" in 0.5 (which I doubt was
planned). I will have to think about this... Maybe you can open an
issue on github.
Maybe just providing a way to put elisp helper code into snippet libraries solves this in a nicer way?
João Távora
unread,
Jul 26, 2012, 6:42:11 PM7/26/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to smart-...@googlegroups.com
I don't know how that would help, but there is already such a way, use
".yas-setup.el"!
Another item to add to the 0.8 changelog, btw...
João
> --
> You received this message because you are subscribed to the Google Groups
> "smart-snippet and YASnippet" group.
> To view this discussion on the web visit