Skip to content

Instantly share code, notes, and snippets.

@sifue
Created December 5, 2012 14:15
Show Gist options
  • Save sifue/4215806 to your computer and use it in GitHub Desktop.
Save sifue/4215806 to your computer and use it in GitHub Desktop.
SublimeText2にコメントとオプション付きのPHPのvar_dumpを表示するsnippetsを追加する ref: http://qiita.com/items/68208a7692ed1e2fbeb8
// TODO var_dumpを消す! by Soichiro Yoshimura
ini_set('xdebug.var_display_max_data', 1048576);
ini_set('xdebug.var_display_max_depth', 20);
print_r("\n!DEBUG! var_dump at " . __FILE__ . "(" . __LINE__ . ")" . ": " . __CLASS__ . "#" . __FUNCTION__ . "\n");
var_dump(varname);
<snippet>
<content><![CDATA[
// TODO var_dumpを消す! by Soichiro Yoshimura
ini_set('xdebug.var_display_max_data', 1048576);
ini_set('xdebug.var_display_max_depth', 20);
print_r("\n!DEBUG! var_dump at " . __FILE__ . "(" . __LINE__ . ")" . ": " . __CLASS__ . "#" . __FUNCTION__ . "\n");
var_dump(${1:varname});
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>var_</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.php</scope>
<description>commented var_dump</description>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment