views:

13

answers:

2

When viewing a plain text code file (i.e. ".py", ".c", ".cpp", ".m", ".as", ".js", etc.) is it possible to have the DAV SVN module render language-specific syntax coloring?

That would be amazing. Currently it's all just black plain text, but it'd great to get this working so it's easier to read code in the browser, for those folks here that just need quick browser access to the svn, without requiring opening the code in an IDE or fancy text editor like Notepad++.

+1  A: 

I don't believe DAV SVN will do this itself. The best it can do is serve documents with the correct Content-Type headers. You can do XSLT transformations on the directory listings, but that doesn't help you much.

I'm afraid you're going to have to switch to a heavier-weight browsing program if you want pretty output. One option would be websvn + enscript.

Paul McMillan
Cool. I installed WebSVN. Syntax highlighting works out of the box. I noticed ".m" objective-c source files don't get properly hightlighted. Do you have any additional tips on that? Is that something Enscript might be able to cover? Thanks for your answer.
liutenantdan
+1  A: 

If apache is already running try websvn with Colourisation of file listings and many more features.

zellus