1. 程式人生 > >centos下vi語法高亮問題

centos下vi語法高亮問題

在CentoS下面使用root登入,執行vi時會發現沒有語法高亮.
一般系統預設就把vi alias到vim才對.

在.bashrc中加上alias後搞定.

vi ~/.bashrc
alias vi=’vim’
vi ~/.vimrc
syntax on
set showcmd ” Show (partial) command in status line.
set showmatch ” Show matching brackets.
set ignorecase ” Do case insensitive matching
set smartcase ” Do smart 
case matching set incsearch ” Incremental search set autowrite ” Automatically save before commands like :next and :make set hidden ” Hide buffers when they are abandoned