I just started using Sublime Text 2 yesterday and I'm liking it a lot. However, I am trying to set up a code snippet that I would use all the time. The problem is that the editor isn't recognizing it at all. I saved it in my Packages/User folder. The snippet is below:
<snippet>
<content><![CDATA[echo "<pre>".print_r(${0:var},true)."</pre>";]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>pre</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.php</scope>
<description>print r with pre tags</description>
</snippet>
Any idea what I'm doing wrong?
Make sure it is saved with a .sublime-snippet
extension. Your snippet will only expand when the scope is php. So it has to be in php tags even if it's in a php file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With