Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

The Voice of the DBA

Steve Jones is the editor of SQLServerCentral.com and visits a wide variety of data related topics in his daily editorial. Steve has spent years working as a DBA and general purpose Windows administrator, primarily working with SQL Server since it was ported from Sybase in 1990. You can follow Steve on Twitter at twitter.com/way0utwest

Formatting Code in LiveWriter

I was getting tired of pre-formatting code in LiveWriter. I love that software, but a couple of the technical things are a PIA. So after messing with this for weeks, hand fixing code blocks, I did the smart thing and Google’d for a plug in.

I found this one, Insert Code for Windows Live Writer, which seems to work well. It installs another “insert” level item called Code

LiveWriter

I can click that, paste in code, and it color codes it. Here’s a sample snippet of T-SQL.

--===== Simple sum/total for each year
SELECT Year,
SUM(Amount) AS Total
FROM #SomeTable1
GROUP BY Year
ORDER BY Year


I picked that up from Jeff Moden’s article cut and pasted it in here. Looks great to me. We’ll see how it holds up. The only downside so far is that it defaults to C# and I have to switch it to TSQL.

Comments

Posted by Anonymous on 13 May 2010

Pingback from  Twitter Trackbacks for                 SQL Server Central, Formatting Code in LiveWriter - SQL Musings         [sqlservercentral.com]        on Topsy.com

Posted by Jack Corbett on 13 May 2010

I think I tried that one, but I like Paste From Visual Studio which is available here, gallery.live.com/liveItemDetail.aspx

Posted by Steve Jones on 13 May 2010

I'll have to try out Paste from VS and see if that works better. Certainly the syndication here leaves something to be desired.

Leave a Comment

Please register or log in to leave a comment.