Re: [viewvc-users] new syntax higlighting and tab size
"C. Michael Pilato" <[email protected]>
| Newsgroups | gmane.comp.version-control.cvs.viewcvs.user |
|---|---|
| Organization | CollabNet, Inc. |
| Message-ID | <[email protected]> |
C. Michael Pilato wrote: > It appears that Pygments supports an option for declaring the tabs-to-spaces > value. ViewVC is not using that option right now, though. > > There's a section of code like this in lib/viewvc.py: > > try: > lexer = get_lexer_for_mimetype(mime_type, > encoding=encoding, > stripnl=False) > except ClassNotFound: > try: > lexer = get_lexer_for_filename(filename, > encoding=encoding, > stripnl=False) > > Try tweaking those get_lexer_for_* calls to include a tabsize=4 parameter. > (I'd do this myself, but I'm not in a test-ready state at the moment.) If > it works, let me know, and I'll built that into a ViewVC as a > user-configurable option so folks don't have to hack the source to get the > feature. I had a chance to play with this, and it works as expected. So, tonight's nightly build (and ViewVC 1.1.3) will offer a "tabsize" configuration option (defaulting to 8) for controlling the tabs-to-space conversion. -- C. Michael Pilato <[email protected]> CollabNet <> www.collab.net <> Distributed Development On Demand ------------------------------------------------------ http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4255&dsMessageId=2386752 To unsubscribe from this discussion, e-mail: [[email protected]].
signature.asc
(application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkqSrdQACgkQokEGqRcG/W5gzwCggWF9CYK2rRKb+eLd7PLq0Rd+ ZBcAn39ZfkAe0iY06zqSgkIeNUb51VqU =zgcd -----END PGP SIGNATURE-----