牵着老婆满街逛

严以律己,宽以待人. 三思而后行.
GMail/GTalk: yanglinbo#google.com;
MSN/Email: tx7do#yahoo.com.cn;
QQ: 3 0 3 3 9 6 9 2 0 .

VIM 支持 UTF8的设定

VIM中文设置,支持中文UTF_8的locale设定,拷贝以下内容到~/.vimrc

或~/.gvimrc中即可。

" multi-encoding setting

if has("multi_byte")

"set bomb

set fileencodings=ucs-bom,utf-8,cp936,big5,euc-jp,euc-kr,latin1

" CJK environment detection and corresponding setting

if v:lang =~ "^zh_CN"

" Use cp936 to support GBK, euc-cn == gb2312

set encoding=cp936

set termencoding=cp936

set fileencoding=cp936

endif

" Detect UTF-8 locale, and replace CJK setting if needed

if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"

set encoding=utf-8

set termencoding=utf-8

set fileencoding=utf-8

endif

else

echoerr "Sorry, this version of (g)vim was not compiled with

multi_byte"

endif

/etc/rcS.d/

posted on 2006-09-20 23:42 杨粼波 阅读(475) 评论(0)  编辑 收藏 引用


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理