sudo apt-get install vim
step2:
cp /etc/vim/vimrc ~/.vimrc
setp3: 编辑.vimrc,添加如下常用内容
set nocompatible
set nu
filetype on
set history=1000
set background=dark
syntax on
set autoindent
set smartindent
set tabstop=4
set shiftwidth=4
set showmatch
set guioptions-=T
set ruler
set nohls
set incsearch
set cursorline
set fencs=utf-8,ucs-bom,euc-jp,gb18030,gbk,gb2312,cp93