LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-15-2011, 08:55 PM   #1
michaelinux
Member
 
Registered: Apr 2009
Location: El Salvador
Distribution: Slackware -current
Posts: 166

Rep: Reputation: 17
Terminal highlight code c,c++,java...etc?


How do i get my terminal to highlight code when i'm writing some code, i remember it was already enabled in all the other distributions that i have used, i remember one time i had to edit some file to enable it and i had to get some code to make it highlight what programming language i was using, i can't really remember what file it was so if you can help me, i'd really appreciate it.
thanks.
 
Old 01-15-2011, 09:07 PM   #2
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
Surely you aren't writing code with Bash alone. What text editor are you using to program in?
 
Old 01-16-2011, 09:36 AM   #3
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714
This has nothing at all to do with the terminal.
 
Old 01-16-2011, 11:16 AM   #4
michaelinux
Member
 
Registered: Apr 2009
Location: El Salvador
Distribution: Slackware -current
Posts: 166

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by MS3FGX View Post
Surely you aren't writing code with Bash alone. What text editor are you using to program in?
i've always used nano, i'm learning to use vim though, i only use IDEs when i have a really big project.
i hope you can help me, as i said before i have done this before but i just can't remember.
 
Old 01-16-2011, 11:20 AM   #5
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,622
Blog Entries: 29

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Quote:
Originally Posted by michaelinux View Post
How do i get my terminal to highlight code when i'm writing some code,
Can you give a dummy example of this for us to understand what you are saying? e.g what do you do when you get the terminal:
Code:
anisha@linux-dpjj:~>
 
Old 01-16-2011, 11:20 AM   #6
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714
As far as I know, only the unstable version of nano supports syntax highlighting. Maybe they released it by now.
 
Old 01-16-2011, 11:22 AM   #7
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,622
Blog Entries: 29

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Emacs running inside the terminal does support syntax highlighting, if that's what you mean.
 
Old 01-16-2011, 03:49 PM   #8
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 7,076
Blog Entries: 52

Rep: Reputation: Disabled
If you look in /usr/doc for nano, you'll find a nanorc example, with the options for syntax highlighting right at the bottom. Copy that to your home directory as .nanorc, and edit it.
 
Old 01-17-2011, 12:40 PM   #9
michaelinux
Member
 
Registered: Apr 2009
Location: El Salvador
Distribution: Slackware -current
Posts: 166

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by brianL View Post
If you look in /usr/doc for nano, you'll find a nanorc example, with the options for syntax highlighting right at the bottom. Copy that to your home directory as .nanorc, and edit it.
ok i'll try that when i get home.
and for those that don't understand what i mean, what i'm trying to do is just like when in a IDE you get the programming language keywords highlighted in other color. that's what am trying to get.
anyway, i'll let you know if i get anything done.
 
Old 01-17-2011, 12:42 PM   #10
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,622
Blog Entries: 29

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Ever heard of Emacs? It does what you want.
 
Old 01-17-2011, 12:46 PM   #11
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,622
Blog Entries: 29

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Look up this: http://sunsite.ualberta.ca/Documenta...q_5.html#SEC75
 
  


Reply

Tags
code, highlight, slackware, terminal


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
code::blocks 10.05 does not highlight code? michaelinux Linux - Software 1 10-24-2010 12:25 PM
getting emacs to highlight code willyweedle Linux - Newbie 1 03-30-2007 11:28 AM
Strange code in my terminal UltraSoul Solaris / OpenSolaris 5 07-25-2005 01:15 PM
Turning off terminal color highlight penguinco Fedora 1 12-08-2004 12:25 PM
Terminal Code CyclopsLiteraly Linux - Software 4 06-10-2004 06:04 PM


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