atom / snippets

Atom snippets package
MIT License
204 stars 102 forks source link

Multiple snippets, same prefix #43

Open willdady opened 10 years ago

willdady commented 10 years ago

Would be great if it was possible to create multiple snippets with the same prefix which presented a dropdown of the matching snippets upon pressing tab.

Sublime currently behaves this way (though you don't even need to press tab). For example in Sublime if I start typing "backbone" the autocomplete dropdown presents me with the various snippets I have for creating backbone.js Views, Models etc... I don't need to remember a different prefix for each.

7even commented 10 years ago

:+1:

zmiimz commented 8 years ago

Any news? This is a limitation of snippets functionality, currently atom shows only last one from the list of snippets with the same prefix.

Ok, adding different numbers of spaces in the prefix keyword almost solves this issue - I can see a list with "the same" snippet prefixes and with different descriptions and bodies. almost - one needs now to count number of spaces in each same-prefix-snippet?

ZelphirKaltstahl commented 8 years ago

I'd also like to see this enhancement happen. +1

winstliu commented 7 years ago

I'm pretty sure this is a limitation of the CSON parser, which only returns the last value for a given key.