Garbled character in Vim

来源:互联网 发布:淘宝售后制度 编辑:程序博客网 时间:2024/06/06 12:50

Quote from http://vimdoc.sourceforge.net/htmldoc/options.html

Vim has four coding methods.

1.encoding(enc)

2.fileencoding(fenc)

3.fileencodings(fencs)

4.termencoding(temc)


Add text below the double quotes line  into your .vimrc if you use windows.

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

" set default code
set fenc=utf-8

"the gb18030 include gb18030,gbk,gb2312, cp936=gbk
set fencs=utf-8,usc-bom,euc-jp,gb18030,gbk,gb2312,cp936,big5
set encoding=utf-8
set fileencodings=utf-8,chinese,latin-1
if has("win32")
set fileencoding=chinese
else
set fileencoding=utf-8
endif
" garbled menu
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
" grabled  console 
language messages zh_CN.utf-8

原创粉丝点击