LinuxQuestions.org
Help answer threads with 0 replies.
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 09-14-2014, 12:00 PM   #1
atlantis43
Member
 
Registered: Feb 2013
Posts: 289

Rep: Reputation: Disabled
highlighting: not syntax highlighting


Some code I have shows "old fashioned" yellow highlighting of selected words commented out in gedit on my compiler. It looks like ordinary highlighting on a word processor.
Wondering if anyone knows how this was effected?
Gnome text editor doesn't seem to apply, as I don't see anything on there other than for syntax "highlighting".
Hope my question is clear.
 
Old 09-14-2014, 12:04 PM   #2
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,856
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
Absolutely clear. You use some version of gedit with some type of source-program and you have some problem with syntax highlighting (or lack of it.)
 
Old 09-14-2014, 12:23 PM   #3
atlantis43
Member
 
Registered: Feb 2013
Posts: 289

Original Poster
Rep: Reputation: Disabled
Nevem:
No, no problem with syntax highlighting!
I'm only wondering how someone else was able to include automatic highligthing of selected words in GEdit. The words are in normal type, yet underscored in yellow, as done with a magic marker. I can't find such a feature in any of the plug-ins, etc.
 
Old 09-14-2014, 12:28 PM   #4
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,856
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
Guess you mean some 'find all; mark all' feature.
 
Old 09-14-2014, 01:00 PM   #5
atlantis43
Member
 
Registered: Feb 2013
Posts: 289

Original Poster
Rep: Reputation: Disabled
something like that, I guess-----
 
Old 09-14-2014, 01:28 PM   #6
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Open the file. select View Menu > Hightlight mode >

I have made no changes to a default opening of an .sh file and here's what it looks (attached)
and the selected hightmode chosen for me is
> Script > sh

Is that what you're after?

Last edited by Habitual; 06-26-2015 at 05:47 PM.
 
Old 09-14-2014, 01:37 PM   #7
atlantis43
Member
 
Registered: Feb 2013
Posts: 289

Original Poster
Rep: Reputation: Disabled
No; What I'm speaking of is a line in gedit such as: //TODO where the phrase TODO is background-highlighted in yellow,
 
Old 09-14-2014, 01:43 PM   #8
Smokey_justme
Member
 
Registered: Oct 2009
Distribution: Slackware
Posts: 534

Rep: Reputation: 203Reputation: 203Reputation: 203
LE: I edited this
Ahh.. the background is highlighted? Ok.. Maybe it does this on words like //TODO: etc.. It's still syntax-highlight .. I don't think it's possible to create a document that tricks gedit into doing this with invisible characters..

Last edited by Smokey_justme; 09-14-2014 at 01:48 PM.
 
Old 09-14-2014, 04:22 PM   #9
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Does it look like this?

bah. Ctrl+k gave me that result, even after saving/closing x and re-opening it was highlighted.
But I can't reproduced it.

See also https://code.google.com/p/smart-highlighting-gedit/

Last edited by Habitual; 06-26-2015 at 05:47 PM.
 
Old 09-14-2014, 06:44 PM   #10
atlantis43
Member
 
Registered: Feb 2013
Posts: 289

Original Poster
Rep: Reputation: Disabled
yes, like Control+F will do it in a search, but it is revocable.
The feature that I'm searching for is that any instance of a given string will show up as highlighted on any Gedit screen.
 
Old 09-14-2014, 07:09 PM   #11
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by atlantis43 View Post
yes, like Control+F will do it in a search, but it is revocable.
The feature that I'm searching for is that any instance of a given string will show up as highlighted on any Gedit screen.
which is exactly what https://code.google.com/p/smart-highlighting-gedit/ shows on that page...
 
  


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
[SOLVED] VIM syntax highlighting: Use of AWK syntax inside shell scripts kaiserkarl13 Programming 1 03-03-2021 09:59 AM
syntax highlighting in vi mehrots Linux - Software 10 07-16-2007 08:50 AM
[SOLVED] vim without syntax highlighting lord_didger Debian 5 11-18-2006 01:29 PM
syntax highlighting rohr Programming 3 07-06-2005 06:07 AM
vim syntax highlighting MiniMe001 Linux - General 2 06-19-2005 11:08 AM

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

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