views:

222

answers:

3

snipmates expands div as <div id = " "> . I want snipmate to show a dropdown menu where I can choose between div id ="" and div class="" (after creating the second one).

The documentation says:

snippet trigger A description of snippet #1
    expand this text
snippet trigger A description of snippet #2
    expand THIS text!

but this effectively opens a small window below where I choose a number and then press enter. But is there a way to make it a dropdown menu?

+1  A: 

This doesnt answer your question directly, but if you dont get a definite answer from others consider making two keys words for the two snippets. Something like ..

divi --> <div id=""

divc --> <div class=""

jeffjose
+3  A: 

No, there isn't a way to make the current implementation use a popup menu like is used for completion. You could file a feature request against snipMate and see if the author can change it to do that, but I'm not sure that'd be easy to do.

jamessan
+3  A: 

I like to use:

<div ${1:id}="${2}">
</div>

This allows me to replace id with class when needed, then tab to the value placeholder.

jinfield