vim can auto detect file encoding like Chinese with the following code
set encoding=utf-8¬
set fenc=utf-8¬
set fileencodings=ucs-bom,utf-8,cp936,gb2312,gb18030,gbk,latin1¬
if(has("win32")||has("win95")||has("win64")||has("win16"))¬
source $VIMRUNTIME/delmenu.vim¬
source $VIMRUNTIME/menu.vim¬
language messages zh_CN.utf-8¬
endif¬
if v:lang =~? '^(zh)|(ja)|(ko)'¬
set ambiwidth=double¬
endif¬
set nobomb
but when I add the code to after.vimrc, it doesn't work, so does I add to vimrc. it will display Chinese character as .
What's the problem?
vim can auto detect file encoding like Chinese with the following code set encoding=utf-8¬
set fenc=utf-8¬
set fileencodings=ucs-bom,utf-8,cp936,gb2312,gb18030,gbk,latin1¬
if(has("win32")||has("win95")||has("win64")||has("win16"))¬
source $VIMRUNTIME/delmenu.vim¬
source $VIMRUNTIME/menu.vim¬
language messages zh_CN.utf-8¬
endif¬
if v:lang =~? '^(zh)|(ja)|(ko)'¬
set ambiwidth=double¬
endif¬
set nobomb
but when I add the code to after.vimrc, it doesn't work, so does I add to vimrc. it will display Chinese character as.
What's the problem?