Not signed in (Sign In)

Categories

Vanilla 1.1.1 is a product of Lussumo. More Information: Documentation, Community Support.

  1.  permalink
    1. Ability to have multiple triggers for a single snippet. For example, I’d like to fire the margin_all snippet with either “margin[tab]” or “mar[tab]”.
    2. For triggers that are associated with multiple snippets, is there any way to sort the order in which they appear? Here’s a few ideas on how that could be done in a really cool way (imho :)
      1. The simple way (err, imo anyway), add a parameter in the snippet syntax that determines order
      2. When the list pops up, give the ability to choose snippets with another trigger word, instead of just a number. For example, I could type “background[tab]color[tab or enter]”. This may sound a bit slower, but I hate scanning that list for the right item.
      3. Maybe have frequently used snippets bubble to the top, so Intype learns what you choose more.

    —————————

    Here’s my rationale for suggesting these features. I learned web development on big IDEs like Dreamweaver that have code completion, so I became dependent on quickly typing things like “pad[enter]”, which would output “padding: ;”. Sometimes instead of typing “pad” though I would type “pa” or “padd” or even “padding” before I hit enter, but the program would always insert the correct text. I still type like that sometimes in lighter text editors and so I cause a lot of backspacing. It would be great to set up snippets with several triggers so that I could type any one of my idiosyncratic shortcuts and always get what I want.

    For the second feature, I just don’t like the snippet popup menu. Most of the time when I type “margin” in my css file I am going to use the shorthand where I define all 4 margin sides in one rule, but in the Intype popup menu for the trigger “margin”, the 4-way shorthand is number 4 in the list. If it was number 1 I could just hit enter immediately and get that one. Besides them being in the wrong order (to me), I also don’t like scanning that list for the item I want each time. I know that with time I will get used to this, but it would be really cool if it was configurable.

    •  
      CommentAuthorFrederick
    • CommentTimeFeb 15th 2007 edited
     permalink

    Take a look at my very old thread about this: Snippet Conventions

    But well yeah, I’m for these suggestions mainly:

    • Multiple triggers per snippet
    • Being able to continue typing the trigger after the list has appeared, to re-sort it or limit it to only the matching snippets
    • Sorting the list by frequency of use, by default
    • CommentAuthorccblaisdell
    • CommentTimeFeb 15th 2007 edited
     permalink

    Augh! I looked and looked for an older thread about this but I couldn’t find one!

    Multiple triggers per snippet would quickly solve that whole “should css triggers be shortened or will that make it too hard” debate. Just have a longhand trigger and a shorthand one. Easy for beginners, but powerful for advanced users.

    I just wonder if this fits in with martincohen’s vision for Intype. I saw one thread where he said he didn’t want to autopair brackets and such things partially because it would require another parsing thread…

    edit: Ha, that’s another one of your threads :)

    •  
      CommentAuthorFrederick
    • CommentTimeFeb 15th 2007 edited
     permalink

    :)

    They’re going to investigate autopairing as far as I understand, yes it will require additional parsing threads but they haven’t dismissed it just because of that. This feature looks like it’s going to be scoped so that you can specify in which languages/scopes it will be active and also specify which characters should be autopaired in which scopes.

    As for having multiple tab triggers per snippet, I think it’s also come up before and the developers either confirmed it or at least didn’t dismiss it, I don’t quite remember.

    • CommentAuthorccblaisdell
    • CommentTimeFeb 15th 2007 edited
     permalink

    I must scour the forums again! I must find where the developers acknowledged this feature request!

    I’ve become a little obsessive about this feature in the past 24 hours.

    edit: Aha, here it is . Martin Cohen wants to add a tab_trigger_match property to the snippet syntax to match triggers with regexs. Cool!

    •  
      CommentAuthorFrederick
    • CommentTimeFeb 15th 2007
     permalink

    Yeah, now I remember…