安装vim扩展,把vi别名到vim,记录一下备用.

安装vim扩展

yum -y  install vim-common.i386 vim-enhanced.i386

把vi alias到vim

[root@OTRS perl]# more ~/.bashrc
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias vi='vim'
# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

更改vimrc这个文件

    vi /etc/vimrc
  1. 添加
  2. set autoindent
    set smartindent
  3. 完成.