Got more questions? Find advice on: SQL | XML | Regular Expressions | Windows
in Search
Welcome to AspAdvice Sign in | Join | Help

Justin Lovell's Blog

Mood: The Grumpy Coder

My method: formatting code for blog posts

I was asked how do I format code for blog posts. Well, to be honest, most of the code that I write in blog posts (and forum posts) are written on the fly, hence the formatting is also done on the fly. However, when I do come to copying and pasting code, I follow these steps:

  1. Copy the code into notepad.
  2. Copy the tab character into the clipboard.
  3. Do a find/replace and paste the tab character from the clipboard for the “find” field. It should appear as a square box.
  4. In the “replace with” field, I then place three spaces. Then hit the magic replace all button.
  5. Cut and paste into the blog entry.
Published Thursday, November 11, 2004 11:33 PM by jlovell
Filed under:
Anonymous comments are disabled