LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-19-2007, 12:29 PM   #1
gautam143
LQ Newbie
 
Registered: Sep 2004
Posts: 15

Rep: Reputation: 0
Cool Colors problem


Hi i am new to Linux.
I am using red hat 7.2(Enigma) which is also in text mode...I am using this for c programing editor is vi...


Now my problem is this

terminal 1 (Alt+F1) root : opened a c program under vi which is colorful text...

terminal 2 (Alt + F2) root: Opened another c program in vi which is not colorful...

My question is how to convert that in colorful. Why this is happened.


I want to set line no in the vi how ??
is there any way of go to line no option..
some time we get name of the file and line no.. but it get disappeared when i move up or down the page...



Can any one help me...
 
Old 09-19-2007, 01:11 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Look in your users home folder. Do you have a hidden file called .vimrc? If so, edit (or create it if it doesn't exist) and add these lines:
syntax on
:colorscheme peachpuff
# show line numbers
:set number

The colorschemes are located in /usr/share/vim/vim63/colors. Try them all to find one you like, then edit the :colorscheme line in .vimrc to use that colorscheme.

To find other options you can set in .vimrc, in a terminal window start vim. Then in command mode, :help set (or any other topic) to find out what you can set.
 
Old 09-19-2007, 01:17 PM   #3
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
:se nu
:sy on
:123
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Linux console colors siddhesh Linux - Software 1 06-19-2006 10:44 AM
problem changing X terminal colors with script shadowsnipes Slackware 5 10-10-2005 11:15 PM
nVidia problem rainbow colors when 3d driver is activated chadl Linux - Hardware 9 09-30-2005 11:09 AM
vmware problem with colors and parallel port babis Linux - Software 7 01-19-2005 12:51 PM
XSession Number of Colors Problem partyman6666 Solaris / OpenSolaris 0 01-07-2004 09:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:16 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration