僕の開発環境
ちまちまと作ってきた開発環境をさらしてみる。
まずは大前提として:http://gulfweed.starlancer.org/d/index.php?itemid=10
追記:
諸々のファイルは全部freehgに入れました。最初はCodeReposに入れるって言っていたんだけど、yasnippetとか*.shとか*.pyをCodeReposにどうきれいに納めるか思いつかなかったので。
http://freehg.org/u/nishio/tcutils/
build.sh
コンパイルに成功したら即テストケースを走らせる。
http://freehg.org/u/nishio/tcutils/file/142a7cc8bd0e/build.sh
yasnippet
freehgに上げた。
http://freehg.org/u/nishio/tcutils/file/142a7cc8bd0e/yasnippet/cc-mode/
まだあまりない。簡単なところだと
cout << ${1:x} << endl;
これは挿入するとxのところにカーソルが移動する。
もっと複雑なやつだと
${1:long long} _${2:v}[${3:N}] = {${4: }}; vector<$1> $2(_$2, _$2 + elementof(_$2));
これは
int _x[5] = {1, 2, 5, 4, 2}; vector<int> x(_x, _x + elementof(_x));
的なコードを挿入する。
テンプレート
FileEdit用のテンプレート。まだまだ改良の余地はあると思うけどとりあえず現状。
(削除:これも最新版をfreehgにいれた。yasnippet/cc-mode/TEMPLATEにしてある。)
iter_print: http://www005.upp.so-net.ne.jp/episteme/html/stlprog/sample.html
elementof: http://blogs.wankuma.com/melt/archive/2007/09/01/93176.aspx