Vim Configuration under Fedora

Source: Internet
Author: User
Tags bz2 git clone

First, installation

1) DNF Installation

FEDORA22 below

sudo Yum Install Vim

Fedora22 and above

sudo Install Vim

If you encounter an error similar to the following

file /usr/share/man/man1/vim. 1 install of vim-common-2:7.4. 1718-1file from the package vim-minimal-2:7.4. 640-4. fc22.x86_64

Run the following command to upgrade VI

sudo VI

Installed in this way, Vim is installed in the/usr/share/vim

2) Source code installation

FTP download

wget FTP://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2

Download to local is a vim-7.4.tar.bz2, so to unzip

Extract

tar -jxvf vim-7.4. tar. bz2

After decompression will be in the current directory to get the Vim74 folder, switch to the Vim74 directory

CD Vim74

Pre-compilation configuration

./configure--prefix=/opt/vim--with-x--enable-gui=gnome2  --with-features=huge--disable-selinux-- Enable-multibyte

Configuration option Description, you can run the./configure--help to see all configuration options

--prefix=/opt/vim Installation Path

--with-x--enable-gui=gnome2 Generation Gvim

--with-features=huge supports maximum features

--disable-selinux compile without checking if SELinux is supported

--enable-multibyte Multi-byte support

This will require the GCC compiler to be installed and installed if it is not installed

sudo Install GCC

If the following error occurs during configuration

 for Tgetent () ... Configure:error:NOT found!  Installfor--with-tlib.

This is not installed ncurses library, run the following command to install

sudo Install Ncurses-devel

You need to reconfigure to run the following command to clean up all files generated by the last compilation

 make Distclean

After configuration, compile and install

sudo  Make  Make Install

Create a soft connection that adds the newly installed path to the system environment variable

mv /usr/bin/vim/usr/bin/vim_backup           # First the original backup ln -s/opt/vim/bin/vim/usr/bin/vim           # Create a soft link

git download

git clone https://github.com/vim/vim.git

After cloning will be in the current directory to get Vim folder, after switching to the VIM directory, and FTP download the same as the compilation

CD VIM

Second, the configuration

Preparatory work

In the home directory, create a new. Vim directory and. vimrc files, vim default profile is/ETC/VIMRC, this is the whole system, so generally do not change this

Switch to the home directory of the current user

CD ~

New. Vim directory and. vimrc file

mkdir . Vim Touch . VIMRC

Switch to the. Vim directory and create a new bundle directory

CD. Vim mkdir Bundle

Switch to bundle, clone Vundle from GitHub to local

CD Bundlegit clone https: // Github.com/gmarik/vundle.git

Switch to the home directory and edit the. VIMRC configuration file

CD ~VI . VIMRC

Vim Configuration under Fedora

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.