個人_vimrc設置

" 配置多語言環境,解決中文亂碼問題

if has("multi_byte")
    " UTF-8 編碼
    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!

colorscheme desert
syntax enable
syntax on


set expandtab   "設置tab
set shiftwidth=4    "設置tab的間隔
set tabstop=4   "四個空格表明一個tab
set sts=4
set showmatch   "在輸入括號時光標會短暫地跳到與之相匹配的括號處
set autoindent  "設置自動縮進
" set smartindent "設置智能縮進
set nowrap    "設置自動換行

set go=-a


"設置字體
if has('gui_running')
  set lines=60 columns=108 linespace=0
  if has('gui_win32')
    set guifont=Microsoft_YaHei_Mono:h10:cANSI:qDRAFT
  else
    set guifont=Microsoft_YaHei_Mono:h10:cANSI:qDRAFT
  endif
endif
相關文章
相關標籤/搜索