This is the mail archive of the
mailing list for the Insight project.
Re: [RFC] syntax highlighting
- From: Steven Johnson <sjohnson at sakuraindustries dot com>
- To: "Th.R.Klein" <Th dot R dot Klein at web dot de>
- Cc: insight at sources dot redhat dot com
- Date: Thu, 04 Aug 2005 08:51:47 -1100
- Subject: Re: [RFC] syntax highlighting
- References: <42F134B1.firstname.lastname@example.org>
This is a good idea. Im not sure of anyone else doing this, so the work
is very appreciated.
My comments are as follows:
1. What variant of Assembler are you syntax highlighting here? There
are many varients, using different comment characters, asm directives,
opcode directives, etc.
2. It would be useful, if your comment block for the 2 "hard coded"
highlighters (the asm one especially) defined the types of things you
are scanning for and highlighting. (what are the keywords, comments,
etc.) it would make understanding the code easier.
3. It would be useful if the extensions that used one or other of the
hard-coded highlighters could be set by the user in a configuration
option. Or maybe even dynamically from the test widget (im thinking a
little drop down that lets you select, for a window, highlight "asm"
"c/c++" "none". While auto choosing is good, sometimes it isnt what you
want. Some people dont like syntax highlighting, so there should be an
option to turn it off.
4. Also, GDB can debug other languages. It would be great if there was
a parameterised "soft coded" syntax highlighter. So the user could (say,
for a given extension) set what the end of line comments are, keywords,
etc and get any file to syntax highlight. Looking at it, it seems all of
the languages youve got already, "asm" and "c" could be done with a
common "Tager" that was parameterised, rather than hard coded.
5. Colors, you should be able to select from the config what colors you
want to use to highlight. Ideally, you would want to be able to set
differnet colors for different highlighters.
6. Regarding the comment "The method isn't the fastest but it seems OK
for the moment. " It seems OK, from a code complexity perspective to
me, if it might be slow on some PC's, then a global enable option, which
bypasses all of this, and just does what Insight does now would be a
good option, then a user could say "bugger this its just too slow for
me" and revert to the existing behaviour, that would have negligible
Ill try and test it this week also. If you can add a parameter to
globally "enable"/"disable" this to the config page, and it works as
expected, then i would be advocating its checking in to the source tree,
so its in future snapshots. Then further work like paramterising,
refining etc, can be worked on. I wouldnt want to see this added to the
source tree if it forced everyone to use it (which is why i suggest the
"global enable" option).
Good work though.
I've ask Vineeth if the developing of the Patch already have started.
Since Vineeth told me that this is not the case.
So I'm sending here a patch, which should carefully reviewed.
The method isn't the fastest but it seems OK for the moment.