默認(rèn)全屏顯示:
autocmd GUIEnter * simalt ~x
設(shè)置編碼為UTF-8:
if has("multi_byte")
set encoding=utf-8
set termencoding=utf-8
set formatoptions+=mM
set fencs=utf-8,gbk
if v:lang =~? '^/(zh/)/|/(ja/)/|/(ko/)'
set ambiwidth=double
endif
if has("win32")
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
language messages zh_CN.utf-8
endif
else
echoerr "Sorry, this version of (g)vim was not compiled with +multi_byte"
endif
設(shè)置語(yǔ)法高亮和代碼行數(shù):
set nu!
syntax enable
syntax on
設(shè)置字體:
set guifont=Consolas:h10
設(shè)置solarized方案:https://github.com/altercation/vim-colors-solarized
下載文件,把solarized.vim放到vim的colors文件夾下。在_vimrc文件配置:
syntax enable
set background=dark
colorscheme solarized