在CentOS下设置vim语法高亮

在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