Vadim's Weblog

Never stop learning.

Archive for the ‘Windows Live Writer’ Category

Live Writer syntax highlighting plug-in for WordPress.

Posted by Vadim on February 8, 2010

About a year ago I wrote a small article how to use syntax highlighting in WordPress using Windows Live Writer.  Few months ago I discovered  Rich Hewlett’s plug-in for Windows Live Writer that works perfectly with WordPress blogs.  I’ve been using it since.

I’m very happy with this plug-in it works great, but it misses the WYSIWYG.  It would be nice to see the code exactly like it appears on the published page during creation of the post.  Also for XML you cannot see code at all.  But it looks great on the published page.

<note>
  <to>Rich</to>
  <from>Vadim</from>
  <subject>Thanks</subject>
  <body>Rich, Thanks for the great plug-in.</body>
</note>

Rich also recently published a new version of his plug-in.  You can download it directly from this link.

I believe that you must have this plug-in if you host your blog on wordpress and publish snippets of code.

Posted in Windows Live Writer | Tagged: , , | 1 Comment »

Syntax highlighting in WordPress using Windows Live Writer

Posted by Vadim on February 24, 2009

We always strive to make our code as readable as possible in our posts.  I’ve been searching for the perfect source code plug-in since I started blogging.  I finally found the style I like to present my code.  It looks like this:

        public void Foo()
        {
            Console.WriteLine("Where's my code plug-in?");
        }

You’ve probably seen this style many times before.  Until today I had no clue how I can present my code similar to this.  It just took a little bit of googling to find out that WordPress allows us to format our code like shown above.

Here’s the syntax we need to use:

[sourcecode language=’csharp’]

your code here

[/sourcecode]

However, it doesn’t solves my problem completely.  I usually create my posts using Windows Live Writer (WLW) and if you try to type the code as above it is not going to look pretty.

So far I found this solution:

1. When pasting code into WLW change to Source view (Shift-F11).

2. Type following:

<pre>[sourcecode language=’csharp’]

— You code goes here.

[/sourcecode]</pre>

3. Switch back to Edit view (F11).

Don’t be alarm that your code doesn’t look as expected in Windows Live Writer.  It’s going to look right in your WordPress blog.

kick it on DotNetKicks.com

Posted in Windows Live Writer | Tagged: , , | 6 Comments »

Windows Live Writer Beta 2 Bug.

Posted by Vadim on June 1, 2007

WLW In my previous post about WLW I mentioned about an ArgumentOutOfRangeException error I get when open existing posts from WordPress.   I was in touch with Joe Cheng from Microsoft.  He asked me to record HTTP activity when error happens and send the info to him.  Here is his reply.

Ahhhh shoot. This is a really bad bug caused by a simple programming error. This problem will occur if you have recent posts that contain pre, script, or style tags (only on WordPress). Unfortunately I don’t have a good workaround for you at this time. Really frustrating since the fix is less than a line of code.

I guess it’s a price of using Beta software.  I still use Windows Live Writer and very happy with it. I believe that WLW team did very good job with this product.  I also want to give some kudos to Joe Cheng, he was very fast to reply and eager to help me with this problem.

Posted in Windows Live Writer | Leave a Comment »

Windows Live Writer Beta 2

Posted by Vadim on May 31, 2007

This post was created with the recently released Windows Live Writer Beta 2.  It supports multiple providers out of the box, it works with WordPressWindows Live Spaces, and TypePad.  However, you can expand it by using Provider Customization API.  That exactly is what Scott Hanselman did for DasBlog.  Read Scott’s Windows Live Writer Beta 2 – DasBlog and the Customization API post for more details.

WriterError

 

As I created this post, I had one problem when I tried to open my existing posts from WordPress.  I got ArgumentOutOfRangeException.

Posted in Windows Live Writer | 1 Comment »