If a person is posting with some sort of code tag like the code, html, or php tags, it should display the line number of each line. This would be quite helpful in communicating issues or suggestions about someones code. So instead of saying " The reference to $_POST you have within your third foreach loop statement is not referencing the same index as the first $_POST you have outside your main loop code block", i then then simply say "The $_POST on line 30 is referencing a different index than the one on line 6" ... Quite a bit easier imo.
Thanks for the suggestion but we've only come across one color coding plug in for vBulletin that includes line numbers, and it destroys all spatial formatting when you copy and paste. When you copy and paste the code, there will be no line breaks.
Thanks for the suggestion but we've only come across one color coding plug in for vBulletin that includes line numbers, and it destroys all spatial formatting when you copy and paste. When you copy and paste the code, there will be no line breaks.
Can't you guys simply program the feature yourself? Or alter the one existing plugin? This is a web developer forum after all ;-)
I'm sure if you put out an announcement others may give it a try, heck i may give it a try in my spare time (what little i have). Shouldn't be that hard to identify the line numbers (and no reason to strip out the formatting).
This Syntax Highlighter is the best I've seen. It has line numbers, and it doesn't destroy formatting (among many other cool features). It's all JavaScript, so if you wanted to use it, all you'd have to do is turn off vBulletin's default highlighting and plug this guy in instead.
Only problem with most line number systems I've seen is that if you try to copy and paste the code into your editor, the line numbers come with it. If you can overcome that somehow, then fine, otherwise I'd rather copy the code into my editor and see the line numbers there.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Only problem with most line number systems I've seen is that if you try to copy and paste the code into your editor, the line numbers come with it. If you can overcome that somehow, then fine, otherwise I'd rather copy the code into my editor and see the line numbers there.
You should try the SyntaxHighlighter demo. You may be pleasantly surprised.
I saw somewhere (on one of the 8,462 design/development blogs out there), the "code blocks" were set with a background image, of alternating light grey/light green, with line numbers.
The layout wasn't "perfect" but it matched the line-height pretty close.
I really wish I remembered which site. I want to say there was a lot of good info on that site. Curse you 3am half-asleep browsing!!
Bookmarks