18 March 2010

Syntax coloured source-code viewer

Programmers who wish to view source code with syntax colouring should check out this preview handler:

http://www.smartftp.com/client/addons/sourcepreview

(This discovery is thanks to spiralx at the Opus forums.)

The preview handler was written for SmartFTP and Windows Explorer but it works great in Directory Opus as well. Just install it and you're done.

It works with both 32-bit and 64-bit, unlike the old Source Code Viewer Plugin.



Supported extensions/types:

  • ActionScript (.as, .mx)
  • ASP (.asp)
  • ASPX (.aspx)
  • AutoIt (.au3)
  • Bash (.sh, .bsh)
  • Batch (.bat, .cmd)
  • Caml (.ml, .mli, .sml, .thy)
  • C (.c)
  • C++ (.cpp, .cxx, .cc, .h, .hxx, .rgs)
  • C# (.cs)
  • CSS (.css)
  • Diff (.diff, .patch)
  • Fortran (.f, .for, .f90, .f95, .f2k)
  • Ini (.ini, .inf, .reg, .url)
  • Inno Setup (.iss)
  • Java (.java)
  • JavaScript (.js)
  • Lisp (.lsp, .lisp)
  • Makefile (.mak)
  • Matlab (.m)
  • NFO (.nfo)
  • NSIS (.nsi, .nsh)
  • Pascal (.pas, .inc)
  • Perl (.pl, .pm, .plx)
  • PHP (.php, .php3, .phtml)
  • Python (.py, .pyw)
  • Resource (.rc)
  • Smalltalk (.st)
  • TeX (.tex)
  • SQL (.sql)
  • VB (.vb)
  • VBScript (.vbs)
  • XML (.xml, .xsd, .xsml, xsl, .kml)
(Not all of the types above are assigned to it by default. To change them in Opus, use go to Settings -> Preferences / Plugins / Viewers: ActiveX + Preview + Office + Web and click Configure, then find Source in the list of preview handlers and modify the list of extensions.)