vim editor
Hello.
i was using redhat linux 8.0. in that when i was opening a new file with vi command (eg. vi hello.cpp). After opening the file i was writing the programs in c/c++/java.Text was formatting very good. i mean when i use keywords like while,for,int,char,break.......etc there was change in the color of text for that key words.... and also if open a for loop or a function it was going to the next tab of the new line .but it is not happening in fedora core 4. please help me................ eg: for() { (if i press enter here cursor was going to new tab of next line in redhat 8 but it is not going in FC 4.) } |
Edit the file /etc/vimrc. Look for this:
" enable syntax highlighting syntax on If it isn't in the file, add it to turn on syntax highlighting. |
Hum...mine is without color also and when I looked into the /etc/vimrc file it did have "syntax on" listed. Is there somewhere else maybe that you can turn it on?
|
For me sometimes at first it doesn't do highlighting for the synatax, but if you quit and reopen the file it will then work.
|
It's also possible the terminal emulator you're using doesn't support ANSI colours.
|
Quote:
~/.vimrc is your personal file which each override what is in /etc/vimrc syntax on If it is not in there - put it in. |
All times are GMT -5. The time now is 05:45 PM. |