This post has been edited by Xing: 06 January 2007 - 11:10 PM
24 Replies - 2650 Views - Last Post: 12 August 2007 - 10:04 AM
#1
Syntax highlighting
Posted 06 January 2007 - 11:10 PM
It would be nice if there would be some kind of syntax highlighting in codes. Is there any option for that?
Replies To: Syntax highlighting
#2
Re: Syntax highlighting
Posted 06 January 2007 - 11:14 PM
what do you mean highlighting? at the top in the address bar, type the word you want to highlight after the hl= and it will be highlighted:
http://www.dreaminco...h...691&hl=here
this line would display this topic, and highlight all occurances of the word here, in or out of code tags.
highlight a word here
http://www.dreaminco...h...691&hl=here
this line would display this topic, and highlight all occurances of the word here, in or out of code tags.
#3
Re: Syntax highlighting
Posted 07 January 2007 - 07:56 PM
WW, I mean the highlighting the way it is in code snippets.
#4
Re: Syntax highlighting
Posted 07 January 2007 - 09:00 PM
Yeh, I've tried coding it myself, didn't have much luck. And I'm not a fan of "mods" for forums as they just break when you upgrade. So... unless the new version of IPB has it, then it's probably not gonna happen any time soon
sorry Xing. It's something I'd really like too.
#5
Re: Syntax highlighting
Posted 07 January 2007 - 09:20 PM
But there is no problem as such.
I'm pretty content with the code tags.
If there's a lot of code to look at, I just copy-paste it into my compiler's IDE.
I'm pretty sure everyone else does that for large amounts of code too.
But yeah, Syntax Highlighting will be useful for reading shorter code.
I'm pretty content with the code tags.
If there's a lot of code to look at, I just copy-paste it into my compiler's IDE.
I'm pretty sure everyone else does that for large amounts of code too.
But yeah, Syntax Highlighting will be useful for reading shorter code.
#6
Re: Syntax highlighting
Posted 07 January 2007 - 09:59 PM
born2c0de, on 8 Jan, 2007 - 09:50 AM, said:
But there is no problem as such.
I'm pretty content with the code tags.
If there's a lot of code to look at, I just copy-paste it into my compiler's IDE.
I'm pretty sure everyone else does that for large amounts of code too.
But yeah, Syntax Highlighting will be useful for reading shorter code.
I'm pretty content with the code tags.
If there's a lot of code to look at, I just copy-paste it into my compiler's IDE.
I'm pretty sure everyone else does that for large amounts of code too.
But yeah, Syntax Highlighting will be useful for reading shorter code.
Most of the time I just look the code and reply. rarely I compile and check. Most of the problems can be found by dry run. Highlighting does help me understand faster.
#7
Re: Syntax highlighting
Posted 07 January 2007 - 10:33 PM
when i used to help people i would just paste it into my compiler.
we should have an inter-site compiler while we're at it...
we should have an inter-site compiler while we're at it...
#8
Re: Syntax highlighting
Posted 09 January 2007 - 03:24 AM
Xing, on 8 Jan, 2007 - 10:29 AM, said:
Most of the time I just look the code and reply. rarely I compile and check. Most of the problems can be found by dry run. Highlighting does help me understand faster.
If you do that for long code, you really have a lot of free time
Quote
when i used to help people ...
#9
Re: Syntax highlighting
Posted 09 January 2007 - 04:30 AM
#10
Re: Syntax highlighting
Posted 13 April 2007 - 08:19 AM
I'm bumping this because a new version of IPB is out.
I was just thinking how nice it would be if we had syntax highlighting and formatting code tags for Java, but then new people rarely use them. And sometimes, even when they do, there's no indenting, or they've one-lined a lot of stuff so it runs past the code window. Maybe I could write a parser that takes syntactically valid Java code, in any form, strips all spaces and line breaks, and outputs formatted, indented, and colored BBCode. Yeah...'cause I have time for that.
I'll put it on my project stack.
#11
Re: Syntax highlighting
Posted 13 April 2007 - 08:22 AM
Someone here wrote a VB app that would actually syntax highlight code using BBCode.
I do have plans to upgrade IPB, but I'm waiting for one more update before I start the process.
Not sure if it has syntax highlighting, but I doubt it.
I probably said it in this thread already, but I don't like adding mods and such to IPB because it makes it very difficult to upgrade and I don't have the time to re-code someone elses mod to work with a new version.
I do have plans to upgrade IPB, but I'm waiting for one more update before I start the process.
Not sure if it has syntax highlighting, but I doubt it.
I probably said it in this thread already, but I don't like adding mods and such to IPB because it makes it very difficult to upgrade and I don't have the time to re-code someone elses mod to work with a new version.
#12
Re: Syntax highlighting
Posted 13 April 2007 - 11:34 AM
skyhawk133, on 13 Apr, 2007 - 08:22 AM, said:
Someone here wrote a VB app that would actually syntax highlight code using BBCode.
I do have plans to upgrade IPB, but I'm waiting for one more update before I start the process.
Not sure if it has syntax highlighting, but I doubt it.
I probably said it in this thread already, but I don't like adding mods and such to IPB because it makes it very difficult to upgrade and I don't have the time to re-code someone elses mod to work with a new version.
I do have plans to upgrade IPB, but I'm waiting for one more update before I start the process.
Not sure if it has syntax highlighting, but I doubt it.
I probably said it in this thread already, but I don't like adding mods and such to IPB because it makes it very difficult to upgrade and I don't have the time to re-code someone elses mod to work with a new version.
I can definitely understand that. It might be a good project for me to undertake for academic purposes anyway. Might helpe me get a stronger grasp of context-free grammars and all that. We'll see.
#13
Re: Syntax highlighting
Posted 24 April 2007 - 04:21 PM
The big problem with doing syntax hilighting in BBCode is the lack of a nonbreaking space like in html. You can hilight, you can even use a font tag to get a fixed width font (heck you have a choice), but you can't use any kind of formating. One work arround is the use of White Colored Text, but this mean that when someone tries to copy your code to try it out, they have to remove all the little spacers you used for formatting. I guess you might be able to use the IMG tag... just thought of that. The [indent] tag does not work.
one interesting point about using the string " " is that when you hit "preview post" you will see " " in your post preview, but NOT in your edit box. When you preview again the string is gone. But sadly it does not replace it with a non breaking space.
See this should be indented... but its not
one interesting point about using the string " " is that when you hit "preview post" you will see " " in your post preview, but NOT in your edit box. When you preview again the string is gone. But sadly it does not replace it with a non breaking space.
#14
Re: Syntax highlighting
Posted 16 June 2007 - 11:34 PM
GeSHi - Generic Syntax Highlighter
It is for phpBB forum system but some tweaking may make it run on this forum also.I am not sure..
If you get time try that out...
It is for phpBB forum system but some tweaking may make it run on this forum also.I am not sure..
If you get time try that out...
#15
Re: Syntax highlighting
Posted 17 June 2007 - 08:38 AM
That's what we use in Code Snippets, I've tried repeatedly to get it working in the forums and there's something about how posts are parsed that makes it damn near impossible it seems.

New Topic/Question
This topic is locked



MultiQuote





|