LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   color in vi editor (https://www.linuxquestions.org/questions/linux-newbie-8/color-in-vi-editor-425304/)

hegdeshashi 03-16-2006 03:15 AM

color in vi editor
 
Hi,


In my vi editor , the color is always black ( letters) only.
How can I change the color of letters?



regards,
hegdeshashi

macemoneta 03-16-2006 03:38 AM

Many distributions actually use vim (which has syntax highlighting) instead of vi these days. If invoked as vi, vim operates in a mode which mimics vi - including the monochrome display.

You can invoke vim directly. For example:

vim somefile

If you have the X11 extensions installed (usually called vim-X11), you can also bring up a GUI with the gvim command:

gvim somefile

If these are not installed by your distribution by default, they can usually be installed using your maintenance tool. For example:

yum -y install vim-X11 vim-minimal vim-enhanced vim-common

jschiwal 03-16-2006 03:56 AM

Try the ":syn on" command. It could be that colors are enabled but the feature isn't enabled.

Also, look in /usr/share/vim/ for a vimrc_example.rc file. You can copy this to your home directory and use it as a model for a ~/.vimrc configuration file to include the changes every time you start vim.

hegdeshashi 03-17-2006 12:00 AM

Hi,

I tried with syn on command, but i could not make it.

This /usr/share/vim/ directory is not there in my system .

vim-x11 also not there.

I am using fedora-9.0 ,linux-2.4.20-8 kernel

I any other solution?

regards,
hegdeshashi

jschiwal 03-17-2006 08:21 AM

Try "locate vimrc". There may be a model configuration file around. There may also be information to be had running through "vimtutor".


All times are GMT -5. The time now is 03:07 AM.