由於 ubuntu系統預設為utf8,因此很多big5 編碼的網頁,編輯時常常呈現亂碼,可以做以下修正:
vim /etc/vim/vimrc 加入以下指令
if has("multi_byte")
set encoding=utf-8
setglobal fileencoding=big5
set fileencoding=big5
set bomb
set termencoding=big5
set fileencodings=ucs-bom,big5,utf-8,latin1
set guifont=-misc-fixed-medium-r-normal-*-18-120-100-100-c-90-iso10646-1
set guifontwide=-misc-fixed-medium-r-normal-*-18-120-100-100-c-180-iso10646-1
else
echoerr "Sorry, this version of (g)vim was not compiled with multi_byte"
endif
set encoding=utf-8
setglobal fileencoding=big5
set fileencoding=big5
set bomb
set termencoding=big5
set fileencodings=ucs-bom,big5,utf-8,latin1
set guifont=-misc-fixed-medium-r-normal-*-18-120-100-100-c-90-iso10646-1
set guifontwide=-misc-fixed-medium-r-normal-*-18-120-100-100-c-180-iso10646-1
else
echoerr "Sorry, this version of (g)vim was not compiled with multi_byte"
endif