LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-17-2004, 12:03 AM   #1
ngan_yine
Member
 
Registered: Aug 2003
Distribution: Slackware 10.1
Posts: 113

Rep: Reputation: 15
my linux console don't print color in c file


Hi
I know I am asking very silly question but it late night now and I can't read any more help file.I use slackware 10 with kernel 2.6 and kde3.3.1,Now after all my installation I found out that my linux console won't print color in shell ,like;
#include <stdio.h>
and thye print it like blue or red colour and for printf("something\n") they print in purple colour or something but I forgot it.How do I turn those feature on in vim?

thanks
 
Old 10-17-2004, 12:37 AM   #2
AMMullan
Member
 
Registered: Sep 2003
Location: United Kingdom
Distribution: Ubuntu, Arch
Posts: 438

Rep: Reputation: 30
I'd try changing your syntax coloring - In vim type :colorscheme <tab> - I use default, it's the best for syntax highlighting (At least I think so)...

Let me know if that helps
 
Old 10-17-2004, 12:52 AM   #3
darthtux
Senior Member
 
Registered: Dec 2001
Location: 35.7480° N, 95.3690° W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070

Rep: Reputation: 47
~/.vimrc needs the line
syntax on
to turn on syntax highlighting.

For color schemes, create the directories ~/.vim/colors
if they don't exist
mkdir -p ~/.vim/colors

Then download some colors schemes from vim.org and put them in the colors directory. Then you can try them out like AMMullan said and they can also be put in .vimrc with the line
colorscheme colorschemename
 
Old 10-17-2004, 11:21 PM   #4
ngan_yine
Member
 
Registered: Aug 2003
Distribution: Slackware 10.1
Posts: 113

Original Poster
Rep: Reputation: 15
Hi guy ,
Thanks for the helps ,both way work fine with me . There is no .vimrc in my /home/~ folder so I copy it from /usr/share/vim/vim/63/vimrc_example and rename it into .vimrc and I check for syntax on or syntax enable command and I switch that on.Before I copy .vimrc I found out that I could use like in vim with
":syatanx enable".One last question if I want to turn sytanx hightlighting for language pascal ,all I have to do it to find pascal.vim color vime and put it in /usr/share/vim/vim63/colours ,right?

Thanks for the help ,it really it comforting to look at color hight light in termel while writing codes.

Thanks!!
Arkar Kyaw win
 
Old 10-17-2004, 11:31 PM   #5
darthtux
Senior Member
 
Registered: Dec 2001
Location: 35.7480° N, 95.3690° W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070

Rep: Reputation: 47
pascal.vim should already be in
/usr/share/vim/vim63/syntax/

When you have "syntax on" all languages with files in above folder should be syntax highlighted automatically.
 
Old 10-18-2004, 03:02 AM   #6
ngan_yine
Member
 
Registered: Aug 2003
Distribution: Slackware 10.1
Posts: 113

Original Poster
Rep: Reputation: 15
I just just the /var/usr/share/vim/vim63/syntax folder and I found out that they got most of language out there .That make it a lot easier ,I just try some code and they reconigse the .pas code right away .That cool!
I need to learn a few language more and I guess I won't be downloading any file from vim.org

Thanks!
Arkar Kyaw Win
 
Old 10-18-2004, 03:31 AM   #7
darthtux
Senior Member
 
Registered: Dec 2001
Location: 35.7480° N, 95.3690° W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070

Rep: Reputation: 47
You might want to download some of their color schemes. Go here
http://www.vim.org/search.php
and put in the searh terms
color scheme

 
  


Reply



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
Print-to-file print driver to print PDF Bill Fox Linux - General 3 05-02-2006 04:15 PM
Linux console mono-color, blinking block cursor introuble Linux - General 1 06-24-2005 06:08 PM
print text file to the console window, how? l.u Linux - Software 3 06-14-2005 02:54 PM
I cant print in color Fiery Mandriva 0 04-10-2004 09:40 PM
Cant print in black only color newlin Linux - Newbie 1 02-15-2003 10:06 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:13 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