Snippets no longer work in Sublime Text 2 with the Tab trigger

This is a problem that made me lose hair. I really don’t have the best solution to this problem and would love someone to offer a better one but I need to get stuff done and I don’t want to fall down a ST2 wormhole where I’m lost for days trying to get something simple to work. I’ve learned that it’s best just to find a work-around because it saves time and sanity.

So, none of my html snippets are working. Not sure why. I have one snippet that fills in the starting code for a twitter bootstrap page. It works great on my Mac but not on my PC. What gives!

I figured it was some plugin I added that was causing a conflict so I used this blog post which saved me from previous keyboard shortcut breakings.

So using the info from that post with the ST2 console let’s me know that expand_abbreviation_by_tab is firing instead of my snippet when I hit the tab trigger of ‘tbs‘ from my snippet. Instead it just does this:

[prettify]

[/prettify]

Obviously, this is not what I want.

Here’s my Quick Fix

I open Preferences > Settings – User
and I add this:
[prettify]”tab_completion”: true[/prettify]

Note: remember that this is a JSON object so each item in it needs to be separated with a comma, except the last one.

It should look something like this (click the JavaScript tab to see the JSON code):
JS Bin

Now I type ‘tbs‘ just like I did before but now instead of hitting tab, I hit ctrl + spacebar and I get a dropdown where I manually choose my snippet.

Definitely not the best solution but one that I can use and continue working until a better solution comes around.

3 Replies to “Snippets no longer work in Sublime Text 2 with the Tab trigger”

    1. Hey Andreas,
      In my blog, the tip I offer is a way to use ctrl + spacebar to act like the tab trigger. Since there is a collision that is overriding the tab trigger, using ctrl + spacebar (after making the change to the default user settings), you can keep emmet and still access the events you want to trigger (from a dropdown). Yes, it’s not as easy as the tab trigger, but I found it’s good enough for my workflow. Food for thought.

Leave a Reply

Your email address will not be published. Required fields are marked *