Friday, June 05th, 2009 | Author:

Well it turns out that the problem is a little more subtle than that. It is only the root user that does not have syntax highlighting.

You see, vim does have syntax highlighting but vi and vim are different binaries. A shell startup script only aliases vi to vim if the user id is higher than 100 – which excludes root. The simplest workaround is to just add an explicit alias to root’s .bashrc at /root/.bashrc :

alias vi='vim'

run the command manually or just log in again to “activate” the alias.

Btw, I’m starting to like vi… a lot. For a long time it made no sense to me – but now I am found. 🙂

Share
Category: linux
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

One Response

  1. 1
    Craig 

    I couldn’t agree with you more. I moved over from nano about 13 months ago, and haven’t looked back.

Leave a Reply » Log in