在Fedora 9下打开discuz的PHP程序,注释部分全是乱码。于是在~/.vimrc中加入一行set fileencodings=utf-8,gbkOK.问题解决,再打开的时候就正常显示中文了。于是完整的.vimrc变成了:set nocompatible set number filetype on set history=1000 set background=dark syntax on set autoindent set smartindent set tabstop=4 set shiftwidth=4 set showmatch set guioptions-=T set vb t_vb= set ruler set nohls set incsearch if has("vms") set nobackup else set backup endif set fileencodings=utf-8,gbk