Hi!
I often have to send my code to someone who doesnt have Notepad++ or IDE to open up the code with colored syntax. Consequently the code is harder to read. Is there a way to get the code into HTML and in the process adding syntax coloring, for example, the parser reads public static void and writes <font color = "blue"><b> public static void </b></font>. I know I could do that myself, but adding syntax coloring to a language is quite lenghty process and Im sure it has already been done (the way I need it).
If anyone knows such a program please tell. Thanks.
You could paste the code to [url=http://pastebin.com/]pastebin.com[/url] and give them the link to it.
[editline]6th January 2012[/editline]
I'm sure there are some PHP libraries to do the same thing if this isn't quite what you were looking for.
Yes, pastebin is quite useful but sometimes I want to have the file on my HDD :)
This is probably overkill, but I know that [url=http://www.stack.nl/~dimitri/doxygen/]Doxygen[/url] can show code with syntax highlighting as a webpage.
Can't you export things to html with N++?
You can use CodeRay with Ruby!
[img]http://i.imgur.com/NxnuE.png[/img]
[QUOTE=Map in a box;34088617]Can't you export things to html with N++?[/QUOTE]
Notepad++ does not do that, but there is a [URL="http://harrysnppstuff.webs.com/"]plugin[/URL] for that (didn't try/test).
Also, Code::Blocks has an export to HTML feature, in case you use that one.
I prefer codepad.org over pastebin, less bloat and it loads way faster
Hmm, this N++ plugin looks useful but when I try it I first get access violation exception, then when I try to use it (because for some reason that exception doesnt f*** up N++) I cant get it to do what I want :S
There's also some standalone application:
[url]http://www.andre-simon.de[/url]
Didn't try that either.
This one actually works, thanks :D
[QUOTE=Jinx786;34081452]Yes, pastebin is quite useful but sometimes I want to have the file on my HDD :)[/QUOTE]
You can save the pastbin page to your computer.
[QUOTE=Dienes;34092020]Notepad++ does not do that, but there is a [URL="http://harrysnppstuff.webs.com/"]plugin[/URL] for that (didn't try/test).
Also, Code::Blocks has an export to HTML feature, in case you use that one.[/QUOTE]
It's part of the default installation actually.
[QUOTE=jaybuz;34095102]It's part of the default installation actually.[/QUOTE]
Wow, it really is, totally overlooked it in the plugins menu...
Better solution than the separate tool imo.
Oh my, I'm so sorry, when I was looking around N++ I must have missed it, thanks for telling me tho :) But the highlighter program you posted (Dienes) is useful even more, it has BBcode support for forums, check it out:
[CODE]
[SIZE=10][COLOR=#8f0055]public class[/COLOR] aclass[COLOR=#000000]{[/COLOR]
[COLOR=#8f0055]public static[/COLOR] [COLOR=#8f0055]void[/COLOR] [COLOR=#000000]main[/COLOR][COLOR=#000000]([/COLOR]String[COLOR=#000000][][/COLOR] args[COLOR=#000000]){[/COLOR]
System[COLOR=#000000].[/COLOR]out[COLOR=#000000].[/COLOR][COLOR=#000000]println[/COLOR][COLOR=#000000]([/COLOR][COLOR=#c00000]"Yay! :D"[/COLOR][COLOR=#000000]);[/COLOR]
[COLOR=#000000]}[/COLOR]
[COLOR=#000000]}[/COLOR]
[/SIZE]
[/CODE]
Oh damn, not working :(
If you don't mind it in PDF, simply get some PDF printer software and File -> Print -> And select your PDF printer.
[editline]13th January 2012[/editline]
Gah, just realized this thread is 5 days old - sorry!
[QUOTE=h2ooooooo;34193032]If you don't mind it in PDF, simply get some PDF printer software and File -> Print -> And select your PDF printer.
[editline]13th January 2012[/editline]
Gah, just realized this thread is 5 days old - sorry![/QUOTE]
New ideas are always welcome. As for pdf, yeah, we use them a lot :)
[QUOTE=swift and shift;34090470]You can use CodeRay with Ruby!
[img]http://i.imgur.com/NxnuE.png[/img][/QUOTE]
But why comic sans
[QUOTE=DrLuke;34196875]But why comic sans[/QUOTE]
I think that's the Mac equivalent font, actually. It seems quite popular as a programming font.
[I]For some reason.[/I]
[QUOTE=BlkDucky;34198474]I think that's the Mac equivalent font, actually. It seems quite popular as a programming font.
[I]For some reason.[/I][/QUOTE]
it's monaco and it rocks
[editline]24th January 2012[/editline]
and no it's not a comic sans equivalent wtf
Sorry, you need to Log In to post a reply to this thread.