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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
02-26-2006, 02:40 AM
|
#1
|
LQ Newbie
Registered: Jan 2006
Posts: 3
Rep:
|
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.)
}
|
|
|
02-26-2006, 03:23 AM
|
#2
|
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908
|
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.
|
|
|
03-01-2006, 04:54 PM
|
#3
|
Member
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 419
Rep:
|
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?
|
|
|
03-01-2006, 05:06 PM
|
#4
|
Member
Registered: Feb 2006
Distribution: Red Hat 9
Posts: 112
Rep:
|
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.
|
|
|
03-02-2006, 01:29 AM
|
#5
|
Senior Member
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545
Rep:
|
It's also possible the terminal emulator you're using doesn't support ANSI colours.
|
|
|
03-02-2006, 02:01 AM
|
#6
|
Senior Member
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 06:41 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|