美文网首页
windows下gVim配置

windows下gVim配置

作者: 匡风含情 | 来源:发表于2017-03-01 11:32 被阅读527次

    默認全屏顯示:

    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
    

    相关文章

      网友评论

          本文标题:windows下gVim配置

          本文链接:https://www.haomeiwen.com/subject/tveqgttx.html