Thanks for the feedback you're giving me, in comments and by email. The encouragement is great.
The experience has been an interesting one so far. In fact, it's also been a quite frustrating one. The Blogger editor is supremely unhelpful when you try to enter preformatted text (like C++ code).
- Code with angle brackets (e.g. < and >) is hard to get into Blogger without accidental butchering during editing or display, since you fall into all sorts of complex HTML problems.
- The Blogger editor continually reformats my pre-formatted code, stripping spaces, inserting spaces, realigning things. Every time you open the editor to fix one mistake, it breaks everything you fixed last time. Very frustrating.
- The editor window is far too small for anything except the smallest pieces of writing.
- I've attempted using external blog editing software, Quama to sidestep these issues. It's a beta version, and so somewhat buggy. It also has it's own ideas of how to butcher and reformat my code.
- The Blogger layout themes don't really help to make code readable at all.
4 comments:
I'm using this:
http://code.google.com/p/syntaxhighlighter/
You can integrate it into your blogger HTML like this:
http://paste.rikkus.info/9
I uploaded the necessary resources to googlepages, as you can see from my example.
HTH!
There's another decent-ish option: If you're using Firefox, you can use the 'It's all text' extension and use your favourite editor to author your posts - and use its inbuilt transform-to-highlighted-html function on the code parts... I've done this with gvim and it's not the worst idea ever.
In case you're not sick of advice: The 'Simple II' layout (part of the standard list of blogger templates) is pretty good when you're showing code - it's nice and wide.
Another nice out-of-browser option:
http://pygments.org/
Post a Comment