|
楼主 |
发表于 2005-8-13 16:49:26
|
显示全部楼层
唉,看来技术问题还是自己解决的好,这个问题我解决了。因为自己编写了.vimrc文件
" 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=utf-8
set termencoding=cp936
set fileencoding=cp936
elseif v:lang =~ "^zh_TW"
" cp950, big5 or euc-tw
" Are they equal to each other?
set encoding=big5
set termencoding=big5
set fileencoding=big5
elseif v:lang =~ "^ko"
" Copied from someone's dotfile, untested
set encoding=euc-kr
set termencoding=euc-kr
set fileencoding=euc-kr
elseif v:lang =~ "^ja_JP"
" Copied from someone's dotfile, untested
set encoding=euc-jp
set termencoding=euc-jp
set fileencoding=euc-jp
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
主要是在
if v:lang =~ "^zh_CN"
" Use cp936 to support GBK, euc-cn == gb2312
set encoding=utf-8
set termencoding=cp936
set fileencoding=cp936
这里有错,改为
if v:lang =~ "^zh_CN"
" Use cp936 to support GBK, euc-cn == gb2312
if has("gui_running")
set encoding=cp936
else
set encoding=utf-8
endif
set termencoding=cp936
set fileencoding=cp936
就可以了。 |
|