我剛安裝了GVim for Windows版本7.4。 我也創建了以下內容的gvimrc文件:gvimrc部分沒有考慮到(Windows 7)
set tabstop=2 " Set the tabstop to 2 spaces
set shiftwidth=2 " Shiftwidth should match tabstop
set expandtab " Convert tabs to <tabstop> number of spaces
set smartindent " Let vim help you with your code indention
highlight Comment guifg=#409040
highlight SpecialComment guifg=#409040
highlight String guifg=Blue
highlight ColorColumn guibg=LightGray
set colorcolumn=81
set tw=0
某些線條考慮在內。 例如:set tabstop=2
其他行不被考慮在內。 例如:,highlight Comment guifg=#409040
如果我稍後使用:so $MYGVIMRC
運行gvimrc文件,則會考慮所有行。
那麼,這些故障線路有什麼問題? 他們被別的東西覆蓋了嗎?
注意:這個gvimrc文件在Ubuntu和Mac上工作正常。
根據':scriptnames',gvimrc是最後一個被調用的源。 按建議添加':autocommand .....'修復了這個問題。 –
它可以幫助解決根本原因嗎? –
太棒了,你現在至少有一個解決方法。要找到根本原因,您需要調查':autocmd VimEnter,GUIEnter,ColorScheme'列出的所有命令;其中一個(希望)重置您的突出顯示定義。 –