LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   NO highlighting in VI editor (https://www.linuxquestions.org/questions/linux-general-1/no-highlighting-in-vi-editor-550040/)

anuj_sri 04-29-2007 11:55 PM

NO highlighting in VI editor
 
Hi
My vi editor does not show any different colors for keywords like int,char etc.. ITs all in one color..
I installed vim, but even that did not help.
Can anyone suggest me something..so that i can get a colorful vi :confused:

slakmagik 04-30-2007 03:46 AM

If you're using vim, you might want something like
Code:

syntax on
filetype plugin indent on

in your ~/.vimrc. vi (in the sense of nvi) doesn't do syntax highlighting and I forget what the configs are for elvis and so on. You don't say what your distro is or what your default vi is.

anuj_sri 04-30-2007 09:18 AM

Hi
:syntax on -I tried this while editing the files. It works only with the files in /usr/local/share/vim/vim55/syntax/ directory
It doesn't work in other files outdide this directory?
what shall i do?

rickh 04-30-2007 10:24 AM

Un-comment the syntax line in /etc/vim/vimrc


All times are GMT -5. The time now is 05:00 PM.