var_dumpを見やすく

var_dumpがはっきり言って見にくいので、なんとかならないのかと思ってたらdBugというのがあった。

上が普通にvar_dump。下がdBugを使ったやつ。

var_dump

dBug

[php]
require_once "dBug.php";
new dBug($result);
[/php]

って書くだけでいい。
これは便利。

http://dbug.ospinto.com/

GeditとかScribesの色を変える。GtkSourceView

ubuntu editor color

Scribesというエディタを使っていて、例えばPHPの関数で色が変わらないものがあったりして変えられないのかと思ってたら、なんか変えられるみたいなことが書いてあった。

Scribes uses GtkSourceView to provide syntax color for source code. In turn, GtkSourceView uses MIME type information to determine source code type, and descriptions in language files to color source code. This tutorial discusses how to add syntax color for languages in GtkSourceView.
MIME Type Information

Scribes - Syntax Color for Languages から2007年7月2日に引用

英語よくわかんないけど、「色変えたいならGtkSourceViewいじればイイよ!GeditもGtkSourceView使ってるよ!」みたいなことが書いてあるような気がしたのでいじってみた。

ubuntuだと、/usr/share/gtksourceview-1.0/language-specs/ にある各言語ファイルの中にあるを追加するとうまくいった。

ubuntu editor color changed

※画像載せてから気付いたけど、ソースが色々やばい