First, the preparatory work before installing VIM7.4
1
The code is as follows |
Copy Code |
Apt-get Update
|
Problem encountered:
W: The key for the following ID does not have a public key available:
8b48ad6246925553
Workaround:
The code is as follows |
Copy Code |
GPG--keyserver subkeys.pgp.net--recv 8b48ad6246925553 GPG--export--armor 8b48ad6246925553 | sudo apt-key add- |
Continue executing apt-get update
Install Vim's dependent library environment after completion
The code is as follows |
Copy Code |
Apt-get Install Libncurses5-dev Libgnome2-dev libgnomeui-dev Libgtk2.0-dev Libatk1.0-dev libbonoboui2-dev Libcairo2-dev Libx11-dev libxpm-dev Libxt-dev Python-dev Libperl-dev Ruby-dev Liblua5.1-0-dev |
Second, uninstall the old version of Vim
The code is as follows |
Copy Code |
Apt-get Remove Vim vim-runtime gvim |
Iii. compiling a new version of Vim
code is as follows |
copy code |
cd/usr/src/ wget ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2 Tar JXVF vim-7.4.tar.bz2 ./configure--prefix=/usr/local/vim74 --with-features=huge --enable-pythoninterp-- Enable-perlinterp --enable-rubyinterp--enable-luainterp --enable-multibyte--enable-sniff--enable-fontset --with-features=huge: Support for maximum features --enable-pythoninterp: Enable vim support for Python --enable-perlinterp: Enable Vim's support for Perl --enable-rubyinterp: Enable vim for Ruby support --enable-luainterp: Enable vim support for LUA --enable-multibyte: Multi-byte support You can enter the Chinese --ENABLE-SNIFF:VIM status hint in vim to suggest that Vim is currently in insert, NORMAL, visual which mode --enable-cscope:vim to Cscope support more parameters to execute./configure--help view |
Compiling and installing
The code is as follows |
Copy Code |
Make && make instal |
Iv. links to identify VIM commands
The code is as follows |
Copy Code |
Ln-s/usr/local/vim74/bin/vim/usr/bin/vim Ln-s/usr/local/vim74/bin/gvim/usr/bin/gvim |
Five, Vim as the default editor
code is as follows |
copy code |
sudo Update-alternatives--install/usr/bin/editor editor/usr/bin/vim 1 sudo update-alternatives--set editor/usr/bin/v Im sudo update-alternatives--install/usr/bin/vi vi/usr/bin/vim 1 sudo update-alternatives--set vi/usr/bin/vi M |