Debian6 compile and install vim 7.4 steps detailed

Source: Internet
Author: User
Tags bz2 gpg

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

Related Article

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.