I use cvs.drupal.org a lot to quickly look up stuff in other people's code, as well as to browse revisions etc. Enabling/adding code highlighting would make it much easier to navigate the content of the files. According to the ViewVC website, there are two options: 1) Highlight, or 2) GNU Enscript. I don't have any familiarity or preference towards either one, as long as they let me (and others) have syntax highlighting when viewing sources at cvs.drupal.org. :)
Comments
Comment #1
gerhard killesreiter commentedInteresting idea, Narayan, do you have an opinion on this?
Comment #2
add1sun commentedJust giving a ping to the idea because it would definitely be nice but I don't know what the backend tech. ramifications are. I do a *lot* of quick check of code online but often rue the code highlighting (lack thereof).
Comment #3
jpoesen commentedViewVC 1.1 apparently plays nice with pygments, an open source syntax highlighter that seems way ahead of both Highlight and Enscript. Projects using it on their site include Trac and GitHub.
D.o. is on ViewVC 1.0.5 so we'd need to upgrade first.
Pygments supports many programming languages, template languages and other markup - the most useful for our purposes probably being:
Quick setup pointers (unverified but should be generally correct):
Install python-pygments with apt-get/emerge/... or with easy_install, then:
In viewvc.conf:
Project site: http://pygments.org/
Comment #4
Freso commentedThe mere fact that it is written in Python, gives it a plus from me. I'm already looking into writing a Drupal-specific lexer for it... :p
Comment #5
add1sun commentedThe recent move and update has added this for us nicely. Closing.