The whole syntax highlighting thing is going to be overhauled, so in my opinion, it will be a bit a waste of time... The SH files will all have to be re-written or updated soon, so I don't see the need to do it twice or more, but if you've got lots of time on your hands, go for it ;)
Ah, you must not have any major projects to procrastinate from... :)
My advice is "sit tight, and wait for the good things to come", but of course, I am just one man :)
Yes, the bundles will need re-writing, but it feels like a stop-gap measure is possible with some work and a small amount of coordination.
It also seems like Allan has a lot of stuff on his to-do list! 1.2 could be a long ways off...
So, to put my money where my mouth is, I tried out Chris Thomas's hierarchical scheme with the Perl.tmbundle just to see how hard it would be. It actually didn't take very long; the main issue was deciding where in the hierarchy things should go, like variables and functions. Things that were unlikely to have an analog in another language (like POD) I put in a hierarchy beneath *.perl.
I also renamed the Latex innards. It was a little harder, as it's not really a programming language, but I took a shot at it.
- Eric
ps. These are the classes I used. I know I'll just have to change them again, but it _feels_ more organized. :)
comments.line.perl comments.perl.POD keywords.control.perl keywords.functions.perl keywords.functions.perl.arrows keywords.functions.perl.comparison keywords.functions.perl.filetest keywords.variables.perl keywords.variables.perl.# keywords.variables.perl.special keywords.variables.perl.special# strings.backticked.perl strings.double-quoted.perl strings.double-quoted.perl.q strings.double-quoted.perl.qlinestart strings.program-block.perl strings.regexp.perl strings.single-quoted.perl
comments.line.latex keywords.functions.latex keywords.functions.latex.citations keywords.functions.latex.sections keywords.latex.braces strings.latex.equation-$ strings.latex.equation-$$ strings.latex.equation-braces
On 16. jan 2005, at 8:42, Eric Hsu wrote:
strings.latex.equation-$ strings.latex.equation-$$
linemath and displaymath respectively, might be better terms. Those are the 'proper' LaTeX names for them.
On Jan 15, 2005, at 11:42 PM, Eric Hsu wrote:
The whole syntax highlighting thing is going to be overhauled, so in my opinion, it will be a bit a waste of time... The SH files will all have to be re-written or updated soon, so I don't see the need to do it twice or more, but if you've got lots of time on your hands, go for it ;)
Ah, you must not have any major projects to procrastinate from... :)
Also, the classification/standardization work will need to be done anyway, and there's no reason it must be done at the same time as the CSS-style syntax rewrite. I don't see this work as wasted at all -- it may simplify conversion to the new syntax (or it may not).
So, to put my money where my mouth is, I tried out Chris Thomas's hierarchical scheme with the Perl.tmbundle just to see how hard it would be. It actually didn't take very long; the main issue was deciding where in the hierarchy things should go, like variables and functions. Things that were unlikely to have an analog in another language (like POD) I put in a hierarchy beneath *.perl.
I also renamed the Latex innards. It was a little harder, as it's not really a programming language, but I took a shot at it.
Awesome!
[snip]
comments.line.perl comments.perl.POD
Maybe "comments.block.embedded-docs"? Ruby has embedded documentation very much like POD. It permits the same style of unconditionally commenting out blocks of text, using =begin and =end instead of =pod and =cut. (Maybe JavaDoc could live under that class as well.)
keywords.control.perl keywords.functions.perl keywords.functions.perl.arrows keywords.functions.perl.comparison keywords.functions.perl.filetest
I've used perl very little, but would these latter three be better as "keywords.operators.*?" (That is, would it be better to select on these in the color prefs UI as "keywords.operators.*"?
keywords.variables.perl keywords.variables.perl.# keywords.variables.perl.special keywords.variables.perl.special# strings.backticked.perl strings.double-quoted.perl strings.double-quoted.perl.q strings.double-quoted.perl.qlinestart
Ruby has a very similar construct (where ruby %Q() == perl qq()). I'm not sure what to call it, though.
In any case, I'm inspired by your example. I'm off to update the C bundle.
Chris
strings.program-block.perl strings.regexp.perl strings.single-quoted.perl
comments.line.latex keywords.functions.latex keywords.functions.latex.citations keywords.functions.latex.sections keywords.latex.braces strings.latex.equation-$ strings.latex.equation-$$ strings.latex.equation-braces
At 10:05 PM -0800 1/16/05, Chris Thomas wrote:
In any case, I'm inspired by your example. I'm off to update the C bundle.
Person by person, procrastination rules, productivity slows.
I made all your suggested changes and checked them in.
best, Eric
ps. TM saved me a lot of time today with the marvelous 'column editing' feature along with the regexp replacing. I first got interested in TM because of folding; in reality, it's a lot of the other features that are saving me time.
On 17. jan 2005, at 7:05, Chris Thomas wrote:
On Jan 15, 2005, at 11:42 PM, Eric Hsu wrote:
comments.line.perl comments.perl.POD
[...]
keywords.control.perl keywords.functions.perl keywords.functions.perl.arrows keywords.functions.perl.comparison keywords.functions.perl.filetest
Remember, as per Allan's mail from yesterday, that language/mode selection is done in a seperate system, so language names like perl, ruby etc. should not occur in the language element names. Rather, they should be general so as to apply to all languages, e.g. keywords.control, comments.line, comments.block etc.