1."Download"
vim-7.4 :
ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2
2."Unzip"
Tar jxvf vim-7.4.tar.bz2
after that, the source file is under the compression package src directory inside
It's best to do it in this directory only . Configure , Make and the Make Install , or you'll get an error.
Cut to src Medium:
3."Configure Configuration"
sudo./configure
\--with-features=huge # Maximum features Supported
\--enable-multibyte # Multi-byte support
\--prefix=/usr/local/vim74 # Setting the installation location
this Configure , you will get an error, such as:
"Install dependent Libraries"
here is a library, not installed, after the ferry, found that others are used Apt-get installation of
I got it. Apt-get , not loaded.
still looking for Yum version of the put,
who knows devel behind is 1 or is L Ah!!
Yum Install Ncurses-devel
4."Compiling, installing"
Make
Make install
And then it's loaded.
5."Create a soft link"
Because the source installation is installed in a folder, there is no binary file in the search directory, to add the path to the search path
To create a soft link:
sudo ln-s/usr/local/vim74/bin/vim/usr/local/bin/vim
6."Configure . VIMRC"
since I am the source of the installation, so in /etc/ none of them called Vim the folder, and I want to Vim the configuration is set to global
so in /etc/ under the establishment of a Vim folder, under which you create a VIMRC file, and then write it into the config statement,
The discovery did not work, but had to be configured under the user's home directory . VIMRC file
. VIMRC The following statements are:
===============================================
1 Syntax on # Set Highlighting
2 Set Nu # an explicit line number
3 Set tabstop=4 # Set TabStop to be 4
4 Set Ruler # set ruler, status line
5 Set Cursorline # Gaoliangxian-Current line
6 Set Nobackup # do not back up files
7 Set Backupcopy=yes # Set Overwrite backup
8 Set backspace=2 # can be deleted with backspace key
9 filetype on # types of monitoring files
Set FILEENCODINGS=UTF-8,GBK # set file encoding, identify Chinese
Set Hlsearch # Set Highlight Search
Set Shiftwidth=4 # Auto Indent length is 4 Lattice
=================================================
7."Install small script"
Wrote a small script, one-click Installation
=======================================================
1#!/bin/bash
2
3 Yum Install Ncurses-devel
4 tar jxvf./softwares/vim-7.4.tar.bz2
5 CD VIM74/SRC
6./configure--with-features=huge--enable-multibyte--prefix=/usr/local/vim74
7 make
8 Make Install
9 echo ' VIM is installed, enjoy! '
============================================================
8."supplemental knowledge make"
I don't know when I'm installing. Make the specific usage, ferry a bit, turn from:
Http://www.cnblogs.com/hnrainll/archive/2011/06/08/2075052.html
Make Clean simply clear the previously compiled executable and configuration files.
and Make Distclean to clear all the generated files.
Makefile
in accordance with GNU Makefiel of the Convention Makefile , contains some basic pre-defined actions:
Make
according to Makefile Compile source code, connect, generate target file, executable file.
Make Clean
clear the last Make the command produces the Object file (suffix ". O" file) and the executable file.
Make install
installs the successful executable file to the system directory, typically /usr/local/bin directory.
Make Dist
generates a publish package file (that is, Distribution Package ). This command will package the executable and related files into a tar.gz compressed file to be used as the software package for the release.
it will generate a name similar to the one in the current directory "Package-version.tar.gz" the file. Package and VERSIONare the am_init_ that we defined in configure.in Automake (Package, VERSION).
Make Distcheck
build and test the release package to determine the correctness of the release package. This will automatically unpack the package file, execute the configure command, and execute make to confirm that thecompilation does not appear to be wrong, and that the package is ready to be released.
Make Distclean similar Make Clean , but it will also Configure The resulting files are all deleted, including Makefile .
CenOS6.5 under the source installation vim-7.4