Sublime Forum

Question Regarding Moving Bundles From TextMate

#1

I’m toying with idea of moving from TextMate, and I am finding A LOT to love about Sublime Text 2. But in the process of moving over my bundles and trying to setup an environment that is analogous to what I’ve enjoyed for some many years, I’ve hit a few small bumps, mostly getting snippets and completions setup.

I guess my question is two fold: One, are .tmbundle’s fully supported in Sublime Text 2, and is there anything to gain by making the bundle more truly native? And two, can you see anything wrong with this specific snippet?

For example, this snippet with a tab trigger which I use very regularly (mostly) only works on the 5th tab press most of the time. It says in the status bar that it is in “Field X of 5”… but it’s not until the 5th press that the snippet actually appears …at which point tabbing through the snippet works fine.

And then other times, maybe 1 in 10 times, it works fine on the very first try. I have yet to discern what makes the difference, and I am testing in a totally empty document.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>content</key>
	<string>&lt;? while (dumb_luck("${1:1}-${2:3}")): ?&gt;$4${5:&lt;? endwhile ?&gt;}$0</string>
	<key>name</key>
	<string>Insert Variable Loop</string>
	<key>tabTrigger</key>
	<string>d++</string>
	<key>uuid</key>
	<string>ABC789BF-ACA2-4CCB-BB3D-61866EAF3B66</string>
</dict>
</plist>

Other times, and this goes for ALL tab triggered snippets, it feels like Sublime doesn’t want too release my cursor from the fields within the snippet…even if I move it away, the next time I tab it will jump BACK into a snippet that I already left with my caret… I can’t figure out if this is a bug or a feature.

Anyway. The complete bundle I am working with lives here, if anyone is interested. I think d++ is the only one really acting up. That is “Insert Variable Loop.tmSnippet”

github.com/kerns/dummy/tree/mas … e/Snippets

0 Likes