Compile and configure gvim 7.0 in RedHat Linux 9
By: |
Wu Yin |
Date: |
2006-12-22 |
Email: |
Lazy_fox # msn.com |
Link: |
Http://blog.csdn.net/wooin/archive/2006/12/30/1468797.aspx |
Copyright information: |
This article is copyrighted by Wu Yin. It can be freely transmitted and replicated for non-commercial purposes. For commercial purposes, any behavior in this article shall be approved by the author. When reprinting, please review the complete version that includes the current version information. Contact info: lazy_fox # msn.com |
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:
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. |
|
7. |
|
8. |
|
9. |
|
10. |
|