Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 02-26-2006, 03:40 AM   #1
LQ Newbie
Registered: Jan 2006
Posts: 3

Rep: Reputation: 0
vim editor

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................

{ (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.)
Old 02-26-2006, 04:23 AM   #2
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,898

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
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.
Old 03-01-2006, 05:54 PM   #3
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 419

Rep: Reputation: 31
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?
Old 03-01-2006, 06:06 PM   #4
Registered: Feb 2006
Distribution: Red Hat 9
Posts: 112

Rep: Reputation: 15
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.
Old 03-02-2006, 02:29 AM   #5
Senior Member
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,544
Blog Entries: 4

Rep: Reputation: 57
It's also possible the terminal emulator you're using doesn't support ANSI colours.
Old 03-02-2006, 03:01 AM   #6
Senior Member
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 54
Is there somewhere else maybe that you can turn it on?
/etc/vimrc.local is a global file
~/.vimrc is your personal file which each override what is in /etc/vimrc

syntax on
If it is not in there - put it in.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Visual in VIM editor manikantha Linux - General 4 06-10-2005 09:55 AM
replace a word in vim editor fssengg Linux - Newbie 3 03-10-2005 09:39 AM
syntax highlighting for ls command and vim editor cseanburns Other *NIX 0 01-02-2005 04:11 AM
Where do I find the help files to customize the VIM editor sharathkv Linux - Newbie 1 11-21-2003 11:37 PM
Configuration for VIM editor ICO Linux - General 5 08-02-2003 09:34 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:27 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration