Welcome to hubFS: THE place for F# Sign in | Join | Help

Hubology: F# source HTML color coding native on The Hub

Scott Isaacs (sisaacs) and I have been working to get an addin for automatic color coding of F# working here on The Hub.  Scott came up with the idea the other day and he and I worked through all of the details recently.

There is a CS2.0 addin that supports formatting of most source code types, e.g. C#, VB.NET, ASP.NET, SQL, etc. on pages in a CS site (hubFS is a CS2.0 site).  F# is not supported natively by the addin, but the addin does allow for new languages to be added as needed.  So Scott installed the addin, constructed a placeholder for F# in the XML for the addin, created the F# icon for the addin's toolbar (so F# can be used from the Rich Text Editor in CS for ANY authoring).  While he did that, I worked on the first draft of the language elements that were needed in the XML file.  He and I ran tests on a few snippets of code and after a few problems (that Scott found and fixed; someone has to correct my stuff), we are up and running.

Use this stuff.  Pound on it.  Let Scott or I know of problems, bugs, what works, what doesn't, what should be colored differently, etc.  It is important to note that this feature is an HTML render-time feature, i.e.

We will use this internally within The Hub until "go live".  Scott will coordinate with the addin author so that F# is included in native support after that time.  So I am clear, this means that anyone that uses the addin on a CS2.0 site, will have native F# color coding for all F# source code that they mark on their site.

Scott's post to introduce this is My Second F# Code.  The How To's and Snippets post is Coloring Your Code on The Hub.  Scott has the link for the CS2.0 addin (for those that want color coding now and F# color coding soon)

Nice work Scott (and it was fun working with you to make this happen).

[Updated to add]:  This facility supports "post preview" mode in forum post authoring.  It does NOT support post preview mode in blog entry authoring.  For the moment, if you are doing a blog entry, open a temporary post on a forum, markup your F# code, preview it, and then cut and paste it into your blog entry (with the native tags around the code to ensure the above mentioned page render-time formatting).  Scott will contact the addin author to determine if this can be fixed.

 

Published Sunday, February 26, 2006 10:14 AM by optionsScalper
Filed Under:

Comments

Wednesday, May 03, 2006 8:27 PM by The Pope of The Hub

# Hubology: Codedrops (and a note on colorized code on The Hub)

There is a new File Folder, Codedrops, for simple code snippets that are submitted by hubFS contributors. ...
Thursday, May 11, 2006 8:01 AM by dsyme

# re: Hubology: F# source HTML color coding native on The Hub

Can we add the keywords "static" and "member" to the keyword list for the syntax colorizer?

e.g. See
http://cs.hubfs.net/blogs/f_team/archive/2006/05/11/247.aspx


Thanks!
Don
Thursday, May 11, 2006 7:55 PM by optionsScalper

# re: Hubology: F# source HTML color coding native on The Hub

Done.

---O
Anonymous comments are disabled