How to Install Vim on CentOS 6.3

This post covers how to install Vim on linux CentOS 6.3. Vim is an alternative to vi editor. Meaning, vim is a text editor that is upwards compatible to Vi. Vim can be used to edit all kinds of plain text. It is especially useful for editing programs. This steps may working on other linux distribution as well.

Execute the following command to install Vim :

[root@centos63 ~]# yum install vim-enhanced -y

Examples :

[root@centos63 ~]# yum install vim-enhanced -y
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base: mirrors.hostemo.com
 * extras: mirrors.hostemo.com
 * updates: mirrors.hostemo.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package vim-enhanced.i686 2:7.2.411-1.8.el6 will be installed
--> Processing Dependency: vim-common = 2:7.2.411-1.8.el6 for package: 2:vim-enhanced-7.2.411-1.8.el6.i686
--> Processing Dependency: libgpm.so.2 for package: 2:vim-enhanced-7.2.411-1.8.el6.i686
--> Running transaction check
---> Package gpm-libs.i686 0:1.20.6-12.el6 will be installed
---> Package vim-common.i686 2:7.2.411-1.8.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package               Arch          Version                    Repository                     Size
====================================================================================================
Installing:
 vim-enhanced          i686          2:7.2.411-1.8.el6          CentOS6.3-Repository          837 k
Installing for dependencies:
 gpm-libs              i686          1.20.6-12.el6              CentOS6.3-Repository           28 k
 vim-common            i686          2:7.2.411-1.8.el6          CentOS6.3-Repository          6.0 M

Transaction Summary
====================================================================================================
Install       3 Package(s)

Total download size: 6.8 M
Installed size: 19 M
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 6.8 M
----------------------------------------------------------------------------------------------------
Total                                                                20 MB/s | 6.8 MB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : gpm-libs-1.20.6-12.el6.i686                                                      1/3
  Installing : 2:vim-common-7.2.411-1.8.el6.i686                                                2/3
  Installing : 2:vim-enhanced-7.2.411-1.8.el6.i686                                              3/3
  Verifying  : 2:vim-common-7.2.411-1.8.el6.i686                                                1/3
  Verifying  : 2:vim-enhanced-7.2.411-1.8.el6.i686                                              2/3
  Verifying  : gpm-libs-1.20.6-12.el6.i686                                                      3/3

Installed:
  vim-enhanced.i686 2:7.2.411-1.8.el6

Dependency Installed:
  gpm-libs.i686 0:1.20.6-12.el6                  vim-common.i686 2:7.2.411-1.8.el6

Complete!

To use vim, type vim instead of vi :

[root@centos63 ~]# vim /etc/httpd/conf/httpd.conf