Find the answer to your Linux question:
Results 1 to 4 of 4
I want to enable the color in my vi editor to easy capture words,etc. The problem is its not enabled. I tried to put .vimrc with "syntax enable" and tried ...
  1. #1
    Linux Newbie
    Join Date
    Mar 2006
    Posts
    101

    how to enable color in vi

    I want to enable the color in my vi editor to easy capture words,etc. The problem is its not enabled. I tried to put .vimrc with "syntax enable" and tried to edit a text file but still doesn't work. I also edit /etc/vimrc and put "syntax enable".

    Anyone knows how to activate it???

  2. #2
    Just Joined!
    Join Date
    Feb 2008
    Posts
    50
    By default, screen is not aware that it is running in a 256 color capable xterm. To make programs in screen recognize this feature, you need to set three things in your ~/.screenrc:

    attrcolor b ".I"
    termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
    defbce "on"

    Refer this link: The 256 color mode of xterm

    Thanks,
    Pankaj.

  3. #3
    Just Joined!
    Join Date
    Feb 2008
    Posts
    50
    Hi,
    have you enable your vim colors..?
    To enable colors you have to just edit "vimrc" file.
    By default Vim stores its global configuration in /etc/vim/vimrc, and user specific configuration in ~/.vimrc.

    Enabling syntax color highlighting during vim startup is as simple as adding the following line in configuration file.
    :syntax enable

    on Debian:
    syntax on

  4. #4
    Linux Enthusiast apoorv_khurasia's Avatar
    Join Date
    Feb 2005
    Location
    Laurasia
    Posts
    624
    Make sure you are using vim ver. 7.0+. I prefer the solution suggested by ypankaj.
    "There is no sixth rule"
    --Rob Pike
    Registered Linux User: 400426 home page

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...