• Welcome to Dark Bit Factory & Gravity.
 

Proposal: Colouration for code ?

Started by LittleWhite, May 21, 2011

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

LittleWhite

Hello,

As we are a coder forum, why our code in the [ code ] [ /code ] is not syntaxicly coloured ?
It would be cool if it could be added. I hope it's not too much work on this architecture ... :) ... moreover since we are handling multiple langages.


int main()
{

    printf("This is a test\n");
    return 0;
}
The demoscene will never die, never!

Shockwave

It's a nice idea but as far as I know there are no SMF modifications out there for RC5 that do this (If you know of a freely available modification that does this please let me know) and it would actually be a huge amount of work to code our own.

I'd suggest instead that you copy and paste the code you want to look more closely at into notepad++ which is free and does a great job of colour coding sources.


Shockwave ^ Codigos
Challenge Trophies Won:

LittleWhite

Quote from: Shockwave on May 21, 2011
It's a nice idea but as far as I know there are no SMF modifications out there for RC5 that do this (If you know of a freely available modification that does this please let me know) and it would actually be a huge amount of work to code our own.

I'd suggest instead that you copy and paste the code you want to look more closely at into notepad++ which is free and does a great job of colour coding sources.
Ok, ... I don't know anything on SMF, so I will trust you the eyes closed :) (I don't know how to say it properly :D)

And, yes, I was thinking about the same workaround ... :) so I will do next time ;)
The demoscene will never die, never!

Shockwave

Thanks for suggesting the idea though :) K+

I try and impliment as many of them as I can.
Shockwave ^ Codigos
Challenge Trophies Won:

LittleWhite

Quote from: Shockwave on May 21, 2011
Thanks for suggesting the idea though :) K+

I try and impliment as many of them as I can.
If you need help, maybe we can work together :) (As I think to know better the C langage ; and I know forums using some colourations scheme :) )
The demoscene will never die, never!

Shockwave

Sorry, you mis-understood - I was thanking you for suggeting the idea and letting people know that ideas are welcome - I alwys do my best to impliment peoples suggestions where possible but this one is very difficult.

As for this one, as nice as it would be I have no plans to impliment it because it will involve too much work and too many modifications to the source - the juice is not worth the squeeze so to speak.

If you can PM me the links to the forums you know are using source colouration that recognises which programming language is being used I will take a look (just to make sure that I am not missing something obvious!)
Shockwave ^ Codigos
Challenge Trophies Won:

LittleWhite

Quote from: Shockwave on May 21, 2011
Sorry, you mis-understood - I was thanking you for suggeting the idea and letting people know that ideas are welcome - I alwys do my best to impliment peoples suggestions where possible but this one is very difficult.

As for this one, as nice as it would be I have no plans to impliment it because it will involve too much work and too many modifications to the source - the juice is not worth the squeeze so to speak.

If you can PM me the links to the forums you know are using source colouration that recognises which programming language is being used I will take a look (just to make sure that I am not missing something obvious!)
oops (will PM the forum which implements it :))
The demoscene will never die, never!

JL235

#7
It's quite trivial to add this (I've done it myself). I used Syntax Highlighter, which is quite popular and does the job very well.

You'll need to alter the tags the code is outputted into (I think syntax highlighter suggests wrapping them in 'pre', but I'm pretty sure I had to use textareas instead), link to the syntax highlighter JS at the bottom of the page, run the syntax highlighting on load and then alter the CSS a little so it fits the dark theme. That's it!
Play My Code - build games in your browser!

Shockwave

Cool!

Thanks for that I'll take a look at it and hopefully our code will be more readable soon :)
Shockwave ^ Codigos
Challenge Trophies Won: