Can you guys please hack it again to add line numbers ?
I've seen it in another programming forum. IMO, it is very useful.
When replying we can just say like, "Change line#5 to line#10 with this code and remove line#21. "
Printable View
Can you guys please hack it again to add line numbers ?
I've seen it in another programming forum. IMO, it is very useful.
When replying we can just say like, "Change line#5 to line#10 with this code and remove line#21. "
iPrank:
Well, on the one hand you are right, but on the other hand it is a real nuisance when you want to cut and paste someone's code to run it quickly.Quote:
it is very useful.
I think it is a matter of personal preference.
My choice would be for no line numbers.
Agreed.Quote:
Originally Posted by AIS4U
Moreover, if you wanted to refer to line numbers, it would be a simple matter of adding them yourself to someone's code post. I often copy and paste code posts into a test project just so I can properly indent what someone has posted and then repost it, with whatever comments I feel appropriate.
Using MZTools, it would be very easy to add lines numbers before reposting the code with your reply.
I think it would be a good idea. It would stop those lazy buggers from copy and pasting code straight from the forum. :D
Or lead to more problems: "I coppied the code you gave and it gave me errors! PLZ HELP! GIMMIE COD!"
-tg
So would be mine.Quote:
Originally Posted by AIS4U
Probably the best solution for this thread.Quote:
Originally Posted by Hack
But as TG pointed out people will copy code with the line numbers and will then complain about the bunch of errors so what's the point - it just more troubles, that's all.
Just add the line numbers in a different element, that way they won't be included when you select the code.
dp.SyntaxHighlighter is a free JavaScript tool for source code syntax highlighting
that's what one forum uses, and I presume what iPrank was referring to - you can see a VB example here - you can't select the line numbers.
i was a bit 'meh', but having thought about it, it would probably be a nice addition - dunno how much effort it would be for joe & co though...
Yep. You are right.Quote:
Originally Posted by bushmobile
Nice link bush, maybe we should get that SyntaxHighlighter if JM has a budget for it. :)
It is licenced under LGPL.Quote:
dp.SyntaxHighlighter is a free JavaScript tool for source code syntax highlighting.
Talk to Brad then... :)
Thats a nice looking piece of formatted code! :)
It does state that it was tested on these browsers:
Internet Explorer 6 on Windows XP SP2
Firefox 1.5
Safari 2.0
Opera 8.5
The other thing is that its a client side js formatter. So if they have js disabled it will not format the code. Still it sounds like its completely free. May be worth looking into.
Client side is not good.
I have used GeSHi for server-side syntax highlighting before. It supports a bewildering array of languages and has been hacking into vBulletin before.
edit: and it supports line numbers :)
WOW !
What a great birthday present ! :D
Thanks Brad, JPnyc and everyone else !
http://www.vbforums.com/images/ieimages/2005/09/1.gif
VB Code:
' testing ' line ' numbers
I like how VB Code doesn't work anymore.
' and how the VB Code button produces hightlight