Pages

Tuesday, September 11, 2012

Math (Unicode) symbol add-on for F#

During my San Francisco trip, Jack asked the math symbol feature. I decide to give it a try and now the first version is ready. The screenshot is shown below. The add-on can be downloaded from Visual Studio gallery.


This add-on only changes the visual of the string and the source code is untouched. So if you open it in a notepad, the code won't contain any math (Unicode) symbol.

The add-on needs a replace file located under "My Document". The sample file is located here. You can download the file and put it under "My Document".

Please leave your comments. :)

5 comments:

jackfoxy said...

Nice work! Is there any chance of this being built into the compiler so we can publish code using unicode operators?

Johan Verwey said...

Would you be willing to share the source code for this? I have been struggling with intra-text adornments without luck. There is only one example in the Visual Studio SDK and it is not very helpful for what I want to do.

Unknown said...

Wonderful idea! I wonder if you might make a version for VS 2010?

B.C. said...

Is there any way to get rid of the extra spaces on either side of the replaced text? It looks odd to have "fun delta" show up with three spaces between λ and Δ.

let λ Δ = foo

Musa said...

I get error "unmatched ( " Visual studio complains at the first open parenthesis? Then in interactive interpreter it ask for ) closing parenthesis expected. So is not recognizing the Greek-Sigma ment to be an operation. F# code was: let inline ( ∑ ) xs = xs |> Seq.sum
let myList = [1..6]
∑ myList