LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices

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

Rep: Reputation: 0
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.)
}
 
Old 02-26-2006, 03:23 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,745

Rep: Reputation: 299Reputation: 299Reputation: 299
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, 04:54 PM   #3
mijohnst
Member
 
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 401

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, 05:06 PM   #4
cramer
Member
 
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, 01:29 AM   #5
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,544
Blog Entries: 4

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

Rep: Reputation: 54
Quote:
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.
 
  


Reply


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 08:55 AM
replace a word in vim editor fssengg Linux - Newbie 3 03-10-2005 08:39 AM
syntax highlighting for ls command and vim editor cseanburns Other *NIX 0 01-02-2005 03:11 AM
Where do I find the help files to customize the VIM editor sharathkv Linux - Newbie 1 11-21-2003 10:37 PM
Configuration for VIM editor ICO Linux - General 5 08-02-2003 08:34 PM


All times are GMT -5. The time now is 06:38 PM.

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