vim正确显示各种中文的基本设置

Vim、Emacs配置和使用
回复
poet
帖子: 2841
注册时间: 2006-09-11 22:47

vim正确显示各种中文的基本设置

#1

帖子 poet » 2007-06-05 22:31

if has("gui_win32") " NT Windows
set encoding=ucs-2le
set termencoding=ucs-2le
set fileencodings=ucs-bom,utf-8,ucs-2le,euc-cn,cp936
elseif has("x11") " X Window
set encoding=utf-8
set termencoding=utf-8
set fileencodings=ucs-bom,utf-8,ucs-2le,euc-cn,cp936
endif

以上设置基本可以保证在windows下gvim和linux下gvim,vim都能够正确显示各种编码集的中文。
poet
帖子: 2841
注册时间: 2006-09-11 22:47

#2

帖子 poet » 2007-06-06 10:08

看来没有人感兴趣。

我要说的是,我上面的方法是错误的,只想看看多久能够有人指出这个错误。
回复