(1) download the source code package from the vim official website.
(2) decompress, compile, and install the SDK.
#./Configure -- prefix =/usr/local/vim73 -- with-x -- enable-gui = gtk2 -- with-features = big
# Make
# Make install
# Make clean
# Make distclean
(3) vim7.3 is installed, but it is still the old version of the system when running vim, because the installation PATH/usr/local/vim73 of vim7.3 is not in the path environment variable of the system. Now, you only need to create a symbolic link to the PATH of the system using the executable file. I am linking to/usr/bin.
# Mv/usr/bin/vim/usr/bin/vim_backup
# Ln-s/usr/local/vim73/bin/vim/usr/bin/vim
(4) If vim is enabled to display Chinese garbled characters, edit ~ /. Vimrc
# Vim ~ /. Vimrc
1 set encoding = gb2312 // encoding
2 syntax on // syntax highlighting
3 set tabstop = 4
4 set shiftwidth = 4 // Number of indentions for line breaks
5 set autoindent
6 set backspace = 2
7 set smartindent
8 set ai! // Auto indent
9 set nu!
10 set showmatch
11 set ruler // The status line at the cursor position is displayed in the lower right corner of the editing process.
12 set incsearch // prefix match search words
13 set vb t_vb = // clear the noise