[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: 有关mutt中使用邮件列表的问题



把下面的一段话写到~/.vimrc里面去。注意,如果终端locale和set
termencoding对应

btw:你是用mutt写信?

" 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
 " Vim内部使用的编码
 set encoding=chinese
" 取决于实际的终端或X Window的设定
 set termencoding=gb2312
" 文件载入时,该选项被置为Vim认定的文件编码,创建时候就用此编码
 set fileencoding=gb2312
 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

 else
        echoerr "Sorry, this version of (g)vim was not compiled with
multi_byte"
endif
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<< cut
Around 23 o'clock on 29  5月, Qingsu Chen wrote:
> 不好意思,各位,上次发的一个问题,显示的是乱码。
> 原因应该是我的vimrc设置有问题。
> 我term的默认locale是gb2312.
> vimrc里写了这个 :set fileencoding=utf-8,gbk
> 是为了能够正确显示其他编码的。
> 但不知道为什么这个会使得编辑的文本也改变编码了。
> 
> 各位有知道更好的方法来实现我想要的功能(让vim显示其他编码的文字吗?
> 我试过网上说的一些,还就上面的那个设置有效果。
> 
> 
> -- 
> 
> 陈庆苏
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-chinese-gb-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> 

-- 
Q.H.Yang@USTC,Hefei CHINA
杨乾辉 <yghustc@mail.ustc.edu.cn>



Reply to: