Windows Live Writer

So I figured I’d check out Windows Live Writer and see what all the buzz is about.

Update: With a plugin I can now copy from Visual Studio, huzzah!

Con – Doesn’t preserve syntax highlighting when copying from Visual Studio.
Pro – With This Plug-in you can paste code from Visual Studio


// Simple F# program to exercise fsc.exe

type Season =
| Spring
| Summer
| Fall
| Winter
override this.ToString() =
match this with
| Spring -> "Spring"
| Summer -> "Summer"
| Fall -> "Fall"
| Winter -> "Winter"

let genSeasonTuples monthRange season =
monthRange |> (fun monthInd -> (monthInd, season))

let monthSeasonList = (genSeasonTuples [1 .. 3] Spring)
@ (genSeasonTuples [4 .. 6] Summer)
@ (genSeasonTuples [7 .. 10] Fall)
@ (genSeasonTuples [11 .. 12] Winter)
let monthSeasonMap = Map.ofList monthSeasonList

open System

let currentMonth = DateTime.Now.Month
let currentSeason = monthSeasonMap.[currentMonth]

printfn "Current season = %s" (currentSeason.ToString())
Console.WriteLine("(press any key)")

Pro – Inserting images is really easy


Comments (4)

  1. Mathias says:

    Hi Chris,

    you can find many plugins for WLW that allow you to insert syntax highlighted code into your posts. I think there are at least 3-4 different plugins for syntax highlighting.

    However, finding one that also supports F# will probably be more difficult… 😉


  2. Hey Chris,

    You need the Paste from Visual Studio plug-in for Live Writer:

    When you copy code from Visual Studio to the clibpoard, one of this clipboard formats preserves the syntax highlighting as RTF. This plug-in simply translates the RTF clipboard format to HTML. So, it supports any language that’s already syntax highlighted in Visual Studio.

  3. Or, you could just use the CopyAsHTML plugin that has been the de facto for a long time.

Skip to main content