Syntax coloured source-code viewer (32 & 64 bit)

See Also:


Cost:

  • Current versions of this viewer require a SmartFTP licence, which is not free. (Back when the post was written, the viewer didn't need this, but that has since changed.)

Install this, and it works straight away, nice and easy!

smartftp.com/client/addons/sourcepreview/

Nothing else needed, going to find/write one with nicer colours though if there isn't any way to change them without hacking the DLL...

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.)

Nice find!

(Added a screenshot & list of types/extensions to your post, hope you don't mind.)

Another thank-you via the news blog comments:

blog.dopus.com/2010/03/syntax-co ... l#comments

Yeah, nice find man... thanks for sharing!

Great find

According to the SmartFTP web page this is only for Vista and above, so people on XP and 2000 may find it doesn't work (although I haven't tested it on either of these).

EDIT: Just noticed you're running XP steje, so I guess it does work on XP.

Yeah man... works well here, haven't noticed any problems so far.

How do I enable this for use within Directory Opus exactly? I have installed the app, but I am getting nothing within Opus. Thanks!

You just need to install it, unless you've disabled the Opus ActiveX plugin.

What kind of file are you trying to view with it?

When you say "nothing," what does that mean exactly? (You should still get the basic Opus text viewer if it's a text file.)

Thanks for the reply leo. I get the basic text viewer plugin. Trying to just have access for quick edits to css js html txt etc. Not sure if this is helpful, but it's a win7 64 bit set-up.

This isn't an editor; it's just a viewer, so it probably won't do what you want anyway.

So what should I be looking for in it's place leo? Just something that will allow a quick edit within the preview pane.

I don't know of any text-editor plugin (or preview handler etc.) which works under 64-bit at the moment.

(Maybe someone has written a preview handler that I don't know of, though. If you find one which works with Explorer it should also work with Opus.)

Thanks for your help leo. Part of the 64 bit pluses and minuses. I guess for me this one is a minus. I'll keep an eye on the plugin thread. Best!

[quote="leo"]I don't know of any text-editor plugin (or preview handler etc.) which works under 64-bit at the moment.

(Maybe someone has written a preview handler that I don't know of, though. If you find one which works with Explorer it should also work with Opus.)[/quote]
The original source code viewer plugin was basically just a thin wrapper around the Scintilla text editor component, I've not spent any time looking for a newer preview handler but it wouldn't surprise me if one was out there somewhere.

scintilla.org

A quick Google search turned this up, which might be an alternative

previewhandlers.codeplex.com/

Probably requires being compiled before you can use it though, but if you know some C# then it's got links to articles about how to create your own :wink:

anyone figured out how to hack the dll to change colours and fonts? I tried just replacing the strings in a hex editor but that doesn't work :frowning:

As others have posted, I'm unable to get this viewer to show up in the list of viewers. I followed some suggestions of others I found here on the forum & still haven't had any success. I copied the following .Dll's to the Opus plug-in folder & still NATA!

  • msvcp71.dll, msvcr71.dll, Scintilla.dll & SourcePreviewHandler.dll

I'm running Win 7 x64. BTW, what is the name given to it in the list of Opus viewers, if & when I get it too work? I certainly don't see anything in the list like "Source Code Viewer" or anything like that.

Any suggestions, tips would be appreciated.

Thanks allot & have a great day!!

I think you are posting in the wrong thread, JimDot.

These are two completely different things (but with similar names and overlapping purposes):

JimDot - you just need to install the application, once it's installed use the ActiveX viewer that comes with DOpus - go to Settings -> Preferences / Plugins / Viewers and make sure ActiveX + Preview + Office + Web is enabled, you can check or modify which extensions do what by clicking on the plugin in the list, then click Configure, then find Source in the list of preview handlers and modify the list of extensions. Hope that helps :slight_smile:

Thanks for the feedback spiralx.
Leo, I followed the link you gave me: Syntax coloured source-code viewer (32 & 64 bit) & it took me to the same place I originally downloaded a 64bit version. At the top of the web page it just say "Source Preview Handler",,, nothing about a coloured source-code viewer. I'm confused. Have I just sliped a bit here?
If that is truly the correct link then something is still wrong because I've installed what that link gave me.