默認全屏顯示:
autocmd GUIEnter * simalt ~x
設置編碼為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
設置語法高亮和代碼行數:
set nu!
syntax enable
syntax on
設置字體:
set guifont=Consolas:h10
設置solarized方案:https://github.com/altercation/vim-colors-solarized
下载文件,把solarized.vim放到vim的colors文件夹下。在_vimrc文件配置:
syntax enable
set background=dark
colorscheme solarized
网友评论