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都能够正确显示各种编码集的中文。
vim正确显示各种中文的基本设置
-
- 帖子: 2841
- 注册时间: 2006-09-11 22:47