Color settings with VI editor with linux

Posted on 2004-11-04
Last Modified: 2013-12-15

How do I control cColor settings with VI editor with linux? If I enable line numbers by 'set nu' the numbers are displayed in yellow and nobody can make out what it is. Please advise me on controlling this color.

Question by:harshavdn
    LVL 11

    Expert Comment


    pretty long document , I am sure it will contain how to do what you want  
    LVL 11

    Expert Comment

    try the following inside vim

     :hi LineNr ctermfg=6

    try different numbers in place of 6 say 1, 2, 3 etc etc to see what suits you

    Author Comment

    Great solution. Thanks a lot for the quick solution.
    LVL 3

    Expert Comment

    you can try as well :

    :set background=dark
    :set background=light

    depending on your background
    LVL 2

    Accepted Solution

    You can use the predefined color schemes shipped with vim in /usr/share/vim/vim62/colors/*.vim (on my box) and try to apply them with

    :so $VIMRUNTIME/colors/name-of-scheme.vim
    :colorscheme name-of-scheme

    create your own .vim eventually and if you want it to be loaded at vim start the command in your home directory .vimrc file.

    Hope this helps.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
    It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now