Saturday, June 28, 2008

java bin目录下的native2ascii使用

直接在命令行中输入native2ascii后可以进入控制台,输入字符串之后native2ascii会将字符串转为unicode编码。
$> native2ascii
test中文
test\u2030\u220f\u2260\u00ca\u00f1\u00e1

Friday, June 20, 2008

vim syntax highlight under mac

$> vi ~/.vimrc
set nocompatible
syntax on

$> mkdir -p ~/.vim/colors
$> vi ~/.vim/colors/test.vim
" customize color scheme in test.vim
" colorscheme test

In mac leopard, there are many colorscheme included, these are in “/usr/share/vim/vim70/colors/”

reference: http://www.cs.cmu.edu/~maverick/VimColorSchemeTest/index.html

Thursday, June 19, 2008

delete all file using linux command file

之前用过以下linux命令删除svn的目录:
$> find . -name '.svn' -exec /bin/rm -f {} \;

对于delete操作可以简写如下:
$> find . -name '.svn' -delete
确认即可删除所有.svn目录