Vim syntax coloring on CentOS

22 Jul

CentOS by default comes without syntax coloring for Vim. You have to install vim-enhanced with this command:

 yum install vim-enhanced

Then, if you’re lazy, open your ~/.bashrc and at the bottom add:

alias vi=vim

Restart your shell!


Posted by on July 22, 2007 in CentOS, Linux


9 responses to “Vim syntax coloring on CentOS

  1. roe

    September 11, 2007 at 7:43 am

    my problem has solved

  2. Nai

    October 11, 2007 at 2:54 pm

    Instead of restarting shell, you could do `source ~/.bashrc` too.

  3. jcisio

    April 9, 2008 at 12:41 pm

    You save me. I’ve just bought a CentOS VPS.

  4. Brett Alton

    April 22, 2010 at 3:11 pm

    For me it’s:

    yum install vim-enhanced
    echo “alias vim=vi” >> .bashrc
    source .bashrc

    But thank you for the tips!

  5. Carlo

    January 12, 2012 at 4:17 pm

    this tips is work properly also on RHEL 6.2

  6. Dan Bernardic

    July 31, 2012 at 1:54 pm

    Ya!!! Thanks buddy.

    Iliti hvala.

  7. Ingo Baab

    December 29, 2014 at 12:27 pm

    Hi Boris,
    that won’t work on my CentOS7, – any idea?
    thank you.
    -Ingo Baab


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: