vote up 0 vote down star

Customizing what files you can preview is cool, but is there a way to create a custom preview extension to add syntax highlighting? I have many .h, .c, .cpp, .cs and .java files on my windows machine and it would be nice to have the syntax highlighting available via explorer's new preview pane.

flag

2 Answers

vote up 0 vote down check

Currently it is not available and there is no add-on I can find anywhere. It has been discussed and commented about so no doubt there is demand for it. I expect an extension to come out soon.

link|flag
It's not because it's discussed and commented that it will be released soon? Unless you're busy on it now ;-) . It would be easier, I think, if they could reuse the editing component of a syntax-highlighting editor like PSPad, Textpad, Notepad++, ... – Snark Nov 6 at 17:16
I said I "expect". Not "it will". – John T Nov 6 at 17:43
Hum, then I'll need to check my En-Fr dictionary again for the meaning of "to expect" :-/ – Snark Nov 6 at 19:03
vote up 0 vote down

There is a Code Preview Handler, but it supports only the extensions .cs, .vb, .js and .sql . The source code is available and it doesn't look too complex to create a Preview Handler (well, sort of, I wouldn't know how to do one).

I tried adding other extensions to the Code Preview Handler with the tool Preview Handler Editor but it doesn't work, the preview pane is blank (at least for the .pl files I tried).

alt text

Edit: you have also a pack of Preview Handlers here, that support the following filetypes:

* 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)
link|flag

Your Answer

Get an OpenID
or
never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.