yum install vim wont work on the CentOs server. First search for the versions of vim on the server using
yum search vim
The result can be something similar to below:
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.steadfast.net * extras: centos-distro.cavecreek.net * updates: centos.mirror.lstn.net Reducing CentOS-5 Testing to included packages only Finished ================================= Matched: vim ================================= vim-X11.x86_64 : The VIM version of the vi editor for the X Window System. vim-common.x86_64 : The common files needed by any version of the VIM editor. vim-enhanced.x86_64 : A version of the VIM editor which includes recent : enhancements. vim-minimal.x86_64 : A minimal version of the VIM editor.
Now use the below code to install the vim editor
yum install vim-enhanced.x86_64