gVim Configuration

Configuration files to display and write code and articles.

gVim UTF-8 config in windows

"editing encoding
let $LANG="zh_CN.UTF-8"
set langmenu=zh_cn.utf-8
set termencoding=utf-8
set encoding=utf-8

"reload menu with UTF-8 encoding
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim

"file encoding
set fileencoding=utf-8
set fileencodings=ucs-bom,utf-8,gbk,big5,latin1

"Hot key to switch between GBK and UTF-8
set <C-u>=^U
set <C-b>=^B
map <C-u>:set fileencoding=utf-8<CR>
map <C-b>:set fileencoding=gbk<CR>

refs

Other Resources