GP SoftwareTwitter
Opus FAQsManualCommandsObjects

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


#1

(See Also: Preview handler for Delphi source code files)

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:

[ul][li]ActionScript (.as, .mx)[/li]
[li]ASP (.asp)[/li]
[li]ASPX (.aspx)[/li]
[li]AutoIt (.au3)[/li]
[li]Bash (.sh, .bsh)[/li]
[li]Batch (.bat, .cmd)[/li]
[li]Caml (.ml, .mli, .sml, .thy)[/li]
[li]C (.c)[/li]
[li]C++ (.cpp, .cxx, .cc, .h, .hxx, .rgs)[/li]
[li]C# (.cs)[/li]
[li]CSS (.css)[/li]
[li]Diff (.diff, .patch)[/li]
[li]Fortran (.f, .for, .f90, .f95, .f2k)[/li]
[li]Ini (.ini, .inf, .reg, .url)[/li]
[li]Inno Setup (.iss)[/li]
[li]Java (.java)[/li]
[li]JavaScript (.js)[/li]
[li]Lisp (.lsp, .lisp)[/li]
[li]Makefile (.mak)[/li]
[li]Matlab (.m)[/li]
[li]NFO (.nfo)[/li]
[li]NSIS (.nsi, .nsh)[/li]
[li]Pascal (.pas, .inc)[/li]
[li]Perl (.pl, .pm, .plx)[/li]
[li]PHP (.php, .php3, .phtml)[/li]
[li]Python (.py, .pyw)[/li]
[li]Resource (.rc)[/li]
[li]Smalltalk (.st)[/li]
[li]TeX (.tex)[/li]
[li]SQL (.sql)[/li]
[li]VB (.vb)[/li]
[li]VBScript (.vbs)[/li]
[li]XML (.xml, .xsd, .xsml, xsl, .kml)[/li][/ul]

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


Plugins (C#): Help writing alternative source-code viewer
Preview handler for Delphi source code files
#2

Nice find!

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


#3

Another thank-you via the news blog comments:

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


#4

Yeah, nice find man… thanks for sharing!


#5

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.


#6

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


#7

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


#8

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


#9

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.


#10

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


#11

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


#12

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


#13

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!


#14

[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


#15

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

previewhandlers.codeplex.com/

[quote]Adds a series of preview handlers to Windows Vista, Windows 7, Outlook 2007 and Outlook 2010 that are useful for software developers.

The pack currently supports:
ActionScript (.as)
ASPX (.aspx)
C# (.cs)
CSS (.css)
Diff (.diff, .patch)
DOS (.bat, .cmd)
JavaScript (.js)
Ruby (.rb, .rhtml, .rjs) thanks to Ivan Porto Carrero
SQL (.sql)
VB (.vb)
[/quote]

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:


#16

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:


#17

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!!


#18

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

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

[ul][li]Source Code Viewer Plugin (The other viewer/editor, which uses the DLLs you mention and which will not work on 64-bit Windows.)[/li]
[li]Syntax coloured source-code viewer (32 & 64 bit) (This thread, which is about a different viewer which works fine on 64-bit Windows.)[/li][/ul]


#19

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:


#20

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.