how to make VI editor show colors in Unix

Hi,
I saw some people's vi editor show different colors on the text according the nature of text when using it.
It would be nice if I can see diffrerent colors with my vi editor.
Do anybody know how to set it up?
I use PowerTermPro program to access unix machine.
I tried to use vim editor but still not showing different color.

Thanks in advance.

When using vim, you may need to add "syntax on" (or "syn on") in your $HOME/.vimrc file
to enable syntax coloring.

I just went to other people's home directory and copied the .vimrc file into my home directory and it worked!!
Thank you so much!
:smiley: :stuck_out_tongue:

no problem at all, another thing I like is a color 'ls' command.

you can just alias your current ls command with 'ls --color=auto' in your .bashrc (for bash) or .cshrc for (csh) depending on what shell your using.

What would it be for a Solaris v8 ksh?

you mean to display the text in different color.

It would be not present.

Dear all,

For changing the color.
You can use
echo '\033[1;31m' - red font color (31m to 39m)
echo '\033[1;41m' - background color(41m to 49).

check the same.