0

Hey guys! Just what you've been waiting for ... You can now specify a language within your code bbcode to use syntax highlighting just like in our code snippet library.

For example ... Just do [code=c] ...

printf("Hello World\n");

Additionally, you can use the noparse bbcode when you don't want bbcode to be parsed. For example ... [b]Hi[/b] ... notice that wasn't parsed into bold despite a matching close tag and no funky spaces thrown in.

4
Contributors
3
Replies
4
Views
10 Years
Discussion Span
Last Post by Soren Werk
0

Excellent!!!

If I may humbly suggest a few visual suggestions, though:

comments in green
"Strings" and 'characters' in blue
Numbers in dark blue
Keywords in bold purple (no underline)
All else is black
C/C++ functions don't need to be colored, but if they are, use a dark color like maybe dark red

All the colors should be of a similar intensity. The switch from the keyword-yellow to function-underline/blue is too striking.

I also notice in the [code=c] section, there is no formatting displayed in the edit window. I assume that's just a glitch, but I thought I'd at least point it out, just in case.

Also, is there a possibility to close up the gap between lines just a tad -- at least as a test? I'd like to see a little less space and a little more code. Instead of 1.5 spacing maybe 1.25.

Edited by deceptikon: Fixed formatting

0

Or how about 1.00...

But WaltP's colors are all wrong. Yours are better. (Mine are the best. No you can't have them :P)

I know! Let's through obscure languages at the feature!

factorial 0 = 1
factorial n = n * factorial (n - 1)

It doesn't look like you have Haskell highlighting yet.

((call/cc call/cc)
 (lambda (f)
   (display "Hello, world!")
   (newline)
   (f f)))

Well at least you have Scheme. But the highlighting is broken, since it treats display and newline like keywords, when they're just built-in procedures.

0

I would like to see this:

    This is text

And this:

This text is allready toggled

And of course, a list of supported syntaxes on the Help with Code Tags page.

Edited by Nick Evan: Fixed formatting

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.