RHEL/CentOS 5 Vim Syntax Color

After installing RHEL/CentOS 5, I noticed on both systems, vim under root user has no color even though I have the correct .vimrc in place. Finally found an answer in Red Hat KB. It seems that in version 5, root user by default uses a minimal version of vim (well, vi) that does not support syntax color. The change was made under /etc/profile.d/vim.sh, anyone who has uid < 100 will be using /bin/vi (minimal version) instead of /usr/bin/vim.

Category: Linux / SysAdmin

3 Responses to “RHEL/CentOS 5 Vim Syntax Color”

  1. M

    Thank you for this!!

  2. scalper

    cool! no wonder i kept hitting syntax with no effect!

    #alias vi=’vim’

    :D

  3. Mike

    Great tip, thanks!


Leave a Reply