This article introduces how to compile and install vim 7.4 In Debian 6. I hope this method will be helpful to you. This article is a reprinted article.
I. Preparations before VIM7.4 Installation
1
| The Code is as follows: |
Copy code |
Apt-get update
|
Problems:
W: No public key is available for the key with the following ID:
8B48AD6246925553
Solution:
| The Code is as follows: |
Copy code |
Gpg -- keyserver subkeys.pgp.net -- recv 8B48AD6246925553 Gpg -- export -- armor 8B48AD6246925553 | sudo apt-key add- |
Continue to execute apt-get update.
Install the VIM dependent library Environment
| 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 |
Ii. Uninstall the old vim version
| The Code is as follows: |
Copy code |
Apt-get remove vim-runtime gvim |
Iii. Compile the new version vim
| The 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: Maximum features supported -- Enable-pythoninterp: enable Vim to support python -- Enable-perlinterp: enable Vim to support perl -- Enable-rubyinterp: enables Vim to support ruby. -- Enable-luainterp: enable Vim to support lua -- Enable-multibyte: supports Inputting Chinese Characters in Vim. -- Enable-sniff: Specifies the mode in which Vim is currently in INSERT, NORMAL, and VISUAL. -- Enable-csable: Vim supports cscope Run./configure -- help to view more parameters. |
Compile and install
| The Code is as follows: |
Copy code |
Make & make instal |
4. Link 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 |
5. Use vim as the default editor
| The Code is as follows: |
Copy code |
Sudo update-alternatives -- install/usr/bin/editor/usr/bin/vim 1 Sudo update-alternatives -- set editor/usr/bin/vim Sudo update-alternatives -- install/usr/bin/vi/usr/bin/vim 1 Sudo update-alternatives -- set vi/usr/bin/vim |