Last active
March 7, 2017 17:02
-
-
Save Emp3r/e79332a991dd64dae7c1ab14365f024f to your computer and use it in GitHub Desktop.
Short PHP snippets for Sublime Text. Maybe unnecessary, but they actually save a lot of time.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"scope": "source.php", | |
"completions": | |
[ | |
{ "trigger": "pu", "contents": "public $1" }, | |
{ "trigger": "pri", "contents": "private $1" }, | |
{ "trigger": "pro", "contents": "protected $1" }, | |
{ "trigger": "rt", "contents": "return $1;" }, | |
{ "trigger": "ifne", "contents": "if (! empty($1)) {$2}" }, | |
{ "trigger": "ifin", "contents": "if (is_numeric($1)) {$2}" }, | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This one is funny, but also it's the best one. It's a full snippet because completion are bugged with "\$" symbols. | |
<snippet> | |
<content><![CDATA[ | |
\$this->$1 | |
]]></content> | |
<tabTrigger>t</tabTrigger> | |
<scope>source.php</scope> | |
</snippet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment