Debian6 detailed steps for compiling and installing vim 7.4

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.