I Just did a straight textmate/sublime conversion from https://github.com/Gipetto/wordpress.tmbundle , all credit goes to the original author
Description :
Sublime Text 2 Wordpress Package is a collection of Wordpress snippets and autocompletions for Sublime Text 2
Original TextMate bundle author : Gipetto - https://github.com/Gipetto/wordpress.tmbundle
Please bear in mind that this is my first attempt at a sublime text plugin and that it is not yet fully tested (only on ubuntu and not all snippets/completions), please dont hesitate to give me feedback/fixes via github.
I allready have one question for someone who has more skills than me :
I think I have an error in my snippet php scope, eg :
- Code: Select all
<snippet>
<content><![CDATA[
function ${2:func_name}($atts) {
$atts = extract(shortcode_atts(array('default'=>'values'),$atts));
// do shortcode actions here
}
add_shortcode('${1:shortcode-id}','${2:func_name}');
]]></content>
<description>Shortcode</description>
<tabTrigger>shortcode</tabTrigger>
<scope>source.php</scope>
</snippet>
Strangely seems to work fine in an HTML file and not in a PHP file, any one know why ? (Please excuse my ignorance)