Skip to content

Alternative to multiple keys for one template #375

@magnars

Description

@magnars

Good day,

What I am trying to achieve is that I have a template that can either be expanded by typing a complete mnemonic shortcut (say ascn for assert.className), or to just type a common root to get a list of suggestions (say as to get a list of all assertions).

The simplest way of fixing that in my mind would be to allow multiple keys. But as I can tell from the yasnippet source code, it might be an extensive job to make that happen.

So, do you have any suggestions on how to do it? Maybe I should programmatically create the snippets instead, and register two snippets per template?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions