Author Topic: Syntax highlighting for the forum  (Read 8374 times)

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Syntax highlighting for the forum
« on: January 11, 2006, 06:04:13 pm »

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Syntax highlighting for the forum
« Reply #1 on: January 11, 2006, 06:09:17 pm »
It would be an useful addition IMHO :).

Michael

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: Syntax highlighting for the forum
« Reply #2 on: January 16, 2006, 06:50:13 am »
I third the notion.

sethjackson

  • Guest
Re: Syntax highlighting for the forum
« Reply #3 on: January 16, 2006, 06:18:57 pm »
I'm all for it.  :D

Offline David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Re: Syntax highlighting for the forum
« Reply #4 on: January 16, 2006, 07:14:32 pm »
me to..
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Syntax highlighting for the forum
« Reply #5 on: January 16, 2006, 07:32:39 pm »
And me _o/

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Syntax highlighting for the forum
« Reply #6 on: January 16, 2006, 10:53:49 pm »
I'm against it.


... just kidding :P muahahaha. Yeah, I'm in favor, too.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Syntax highlighting for the forum
« Reply #7 on: January 16, 2006, 11:10:56 pm »
How 's this?

Code: C++
  1. #include <iostream>
  2.  
  3. int main(int argc, char** argv)
  4. {
  5.     std::cout << "Hello world!" << std::endl;
  6.     return 0;
  7. }
  8.  
Be patient!
This bug will be fixed soon...

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Syntax highlighting for the forum
« Reply #8 on: January 16, 2006, 11:20:00 pm »
Hmm... does it show "Created by GeSHI" every time?  :?
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Online killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5229
Re: Syntax highlighting for the forum
« Reply #9 on: January 16, 2006, 11:22:31 pm »
we'll see
Code: C++
  1. int main()
  2. {
  3.   int x = 0,
  4. } // end of main
  5.  

seems so

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: Syntax highlighting for the forum
« Reply #10 on: January 16, 2006, 11:27:11 pm »
Hmm... does it show "Created by GeSHI" every time?  :?
But the code is at last readable :) See the good side of it
Edit: Yiannis did some magic again I guess and it dissapeared
Life would be so much easier if we could just look at the source code.

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: Syntax highlighting for the forum
« Reply #11 on: January 17, 2006, 12:32:09 am »
Thanks Yiannis :D. The parser isn't the best, but yes, it's more readable.

Testing :)

Some C++
Code: C++
  1. void cbEditor::ToggleBreakpoint(int line, bool notifyDebugger)
  2. {
  3.     if (HasBreakpoint(line))
  4.         RemoveBreakpoint(line, notifyDebugger);
  5.     else
  6.         AddBreakpoint(line, notifyDebugger);
  7. }

Some Diff
Code: Diff
  1. Index: cbeditor.cpp
  2. ===================================================================
  3. --- cbeditor.cpp        (revision 1717)
  4. +++ cbeditor.cpp        (working copy)
  5. @@ -548,7 +548,7 @@
  6.         // FIXME: how to display a mark with an offset???
  7.         m_pControl->SetMarginWidth(1, 16);
  8.      m_pControl->SetMarginType(1, wxSCI_MARGIN_SYMBOL);
  9. -    m_pControl->SetMarginSensitive(1, 1);
  10. +    // FIXME: Make this an option: m_pControl->SetMarginSensitive(1, 1);
  11.      m_pControl->SetMarginMask(1, (1 << BOOKMARK_MARKER) |
  12.                                   (1 << BREAKPOINT_MARKER) |
  13.                                   (1 << DEBUG_MARKER) |
  14.  

Some DOS
Code: DOS
  1. @echo off
  2. echo Creating output directory tree
  3.  
  4. copy /y setup\codeblocks.exe.manifest output > nul
  5. strip output\*.exe

Some INI
Code: INI
  1. nSelProfile=0
  2. [keyprof0]
  3. desc=Our primary keyprofile
  4. name=Primary
  5. bind542-type4660=New file|Create a new source file|Ctrl+N|
  6. bind606-type4660=New project...|Create a new project based on a template|Ctrl+Shift+N|
  7.  

Some XML
Code: XML
  1. <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
  2. <CodeBlocksConfig version="1">
  3.         <style16>
  4.                 <BOLD bool="1" />
  5.                 <ITALICS bool="0" />
  6.                 <UNDERLINED bool="1" />
  7.                 <ISSTYLE bool="1" />
  8.                 <NAME>
  9.                         <str>Matching brace highlight</str>
  10.                 </NAME>
  11.         </style16>
  12. </CodeBlocksConfig>

:D

Just a note: Bash highlighting brokes Apache, it gives the error:
Code: [Select]
Error 406: Not Acceptable
An appropriate representation of the requested resource /index.php could not be found on this server.
« Last Edit: January 17, 2006, 12:36:22 am by Takeshi Miya »

Offline Urxae

  • Regular
  • ***
  • Posts: 376
Re: Syntax highlighting for the forum
« Reply #12 on: January 17, 2006, 12:50:14 am »
Just a note: Bash highlighting brokes Apache, it gives the error:
Code: [Select]
Error 406: Not Acceptable
An appropriate representation of the requested resource /index.php could not be found on this server.

Try leaving off the first line. The forums don't like the names of shell interpreters :(.

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Syntax highlighting for the forum
« Reply #13 on: January 17, 2006, 01:26:58 am »
We could alter that code... i think...

anyway, that light cyan burns my eyes, can it be changed to something more friendly?

sethjackson

  • Guest
Re: Syntax highlighting for the forum
« Reply #14 on: January 17, 2006, 01:41:42 am »
We could alter that code... i think...

anyway, that light cyan burns my eyes, can it be changed to something more friendly?

Yeah someone please fix it I'm going blind.....  :lol: