1. Download the vim source code: the official website of vim is: Ghost
1.
Download the vim source code:
Vim Official Website: www.vmunix.com/vim
You can use this link to download the source package: ftp://ftp.jp.vim.org/pub/vim/unix/vim-7.0.tar.bz2
2.
Configuration:
To compile gvim, use the following configuration command:
$./Configure/
-- Prefix =/usr/local/vim7/# installation directory
-- With-x -- enable-gui = gtk2/# compile gvim
-- With-features = big
3.
Compilation and installation:
There's nothing to say. Just use the following command.
$ Make
# Make install # Remember to run with root. After installation, the executable file is in/usr/local/vim7/bin /.
4.
Install it in the system:
At this time, vim7.0 is installed, but when you run vi, vim, or vimdiff, whether to enable the vi 6.1 version that comes with RedHat Linux 9, because your vim 7.0 installation PATH/usr/local/vim7/bin is not in the path environment variable of the system, now, you can use the executable file to create a symbolic link to the PATH of the system. I am linking to/usr/bin:
# Mv/usr/bin/vim/usr/bin/vim61 # change the original vi 6.1 Name first
# Ln-s/usr/local/vim7/bin/vim/usr/bin/vim # Link vim 7.0
Run vi, vim, and gvim to view the newly compiled 7.0 version.
5.
V7.0 Configuration:
When running gvim, the menu is garbled and you need to create a file in your root directory ~ /. Vimrc, add a sentence in it
: Set encoding = gb2312
Restart gvim to view the Chinese menu.
. Vimrc is the vi STARTUP configuration file, which can be used to set many startup parameters. You can find a variety of startup parameters written by many people online. the vimrc file contains a simple one. vimrc file.
6.
My. vimrc file:
Set encoding = gb2312
Syn on "enable syntax highlighting
Set guifont = Luxi/Mono/9 "set Font, font name, and font size
Set tabstop = 4 "set the width of the tab key
Set shiftwidth = 4 "four spaces are used for line breaking.
Set autoindent "Automatic Alignment
Set backspace = 2 "set backspace key available
Set smartindent "smart alignment
Set ai! "Set automatic indent
Set nu! "Display row number
Set showmatch "sets the matching mode, similar to the right brace that will be matched when a left brace is entered.
Set ruler "shows the status line at the cursor position in the lower right corner during editing
Set incsearch is very convenient to query. To search for the book word, it is automatically found when/B is entered.
"The first word starting with B is automatically found when/bo is entered.
"Words, and so on. When searching, you can use this setting to quickly find the answer.
"Do not forget to press Enter when you are looking for a matching word.
When set vb t_vb = "vim is edited, if a command error occurs, a sound will be triggered. This setting removes the sound.
Reading:
Install http://www.linuxidc.com/Linux/2013-06/85821.htm automatically in gVim/vim clang_complete under Ubuntu
Ubuntu 12.04 gVim installation Problem and Solution http://www.linuxidc.com/Linux/2013-01/77314.htm
GVim installation deployment http://www.linuxidc.com/Linux/2012-12/77143.htm in Windows Server
Ubuntu manual compilation gVim7.3 fix conflicts with ibus when the terminal is started http://www.linuxidc.com/Linux/2012-06/63463.htm
Vi/Vim/gVim custom http://www.linuxidc.com/Linux/2012-06/62792.htm color